diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-16 16:30:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 16:30:49 +0100 |
commit | 75765b55213e824f21e18537e09af01e78c86ec6 (patch) | |
tree | bbe0c11fbd876b60b17d990171c682fd30b3706a /interface/js/app | |
parent | acc4b6480944600f47dcc0458214afe5b569ab33 (diff) | |
parent | 517c412bbd1d0419bc198591b70a89a5d425ed91 (diff) | |
download | rspamd-75765b55213e824f21e18537e09af01e78c86ec6.tar.gz rspamd-75765b55213e824f21e18537e09af01e78c86ec6.zip |
Merge pull request #3797 from moisseev/webui-fixes
Webui fixes
Diffstat (limited to 'interface/js/app')
-rw-r--r-- | interface/js/app/rspamd.js | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index 7e571602a..1679db1b3 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -298,21 +298,22 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_ }); if (!ui.read_only) tab_selectors.displayUI(ui); }, + complete: function () { + if (ui.read_only) { + $(".ro-disable").attr("disabled", true); + $(".ro-hide").hide(); + } else { + $(".ro-disable").removeAttr("disabled", true); + $(".ro-hide").show(); + } + + $("#preloader").addClass("d-none"); + $("#navBar, #mainUI").removeClass("d-none"); + $(".nav-tabs-sticky").stickyTabs({initialTab:"#status_nav"}); + }, errorMessage: "Cannot get server status", server: "All SERVERS" }); - - if (ui.read_only) { - $(".ro-disable").attr("disabled", true); - $(".ro-hide").hide(); - } else { - $(".ro-disable").removeAttr("disabled", true); - $(".ro-hide").show(); - } - - $("#preloader").addClass("d-none"); - $("#navBar, #mainUI").removeClass("d-none"); - $(".nav-tabs-sticky").stickyTabs({initialTab:"#status_nav"}); } function alertMessage(alertClass, alertText) { @@ -497,12 +498,12 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_ }, 1000); }); - $('a[data-toggle="tab"]').on("shown.bs.tab", function (e) { - tabClick("#" + $(e.target).attr("id")); + $('a[data-toggle="tab"]').on("shown.bs.tab", function () { + tabClick("#" + $(this).attr("id")); }); $("#refresh, #disconnect").on("click", function (e) { e.preventDefault(); - tabClick("#" + $(e.target).attr("id")); + tabClick("#" + $(this).attr("id")); }); $(".dropdown-menu a").click(function (e) { e.preventDefault(); |