aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormoisseev <moiseev@mezonplus.ru>2021-06-15 20:47:16 +0300
committermoisseev <moiseev@mezonplus.ru>2021-06-16 18:16:13 +0300
commita4fe264d7f4124ac7ee5fcb3ddf47791e9ef2c03 (patch)
tree15473e437b73ba516dbef269d7ca27c8dee03c17
parentacc4b6480944600f47dcc0458214afe5b569ab33 (diff)
downloadrspamd-a4fe264d7f4124ac7ee5fcb3ddf47791e9ef2c03.tar.gz
rspamd-a4fe264d7f4124ac7ee5fcb3ddf47791e9ef2c03.zip
[Minor] Wait until "auth" Ajax request finishes
-rw-r--r--interface/js/app/rspamd.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 7e571602a..2f1b88aa0 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) {