diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-28 23:42:27 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 23:42:27 +0600 |
commit | a06f4c1439fda74bc221812a3ecbfba0a285dffd (patch) | |
tree | b2819e59ddf767ecbc2a0b2faca6fc2dbd61b08a /interface/js/app/config.js | |
parent | 4adcf12295934fa5d64b4867ebd67e8dba325ae1 (diff) | |
parent | f44458b19aae42fd58e6faca3af15b1b9b7d3833 (diff) | |
download | rspamd-a06f4c1439fda74bc221812a3ecbfba0a285dffd.tar.gz rspamd-a06f4c1439fda74bc221812a3ecbfba0a285dffd.zip |
Merge pull request #4796 from moisseev/webui
[Minor] Move server selection logic to common.js
Diffstat (limited to 'interface/js/app/config.js')
-rw-r--r-- | interface/js/app/config.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 6be107555..d7b43dfdb 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -29,7 +29,7 @@ define(["jquery", "app/common"], "use strict"; const ui = {}; - ui.getActions = function getActions(checked_server) { + ui.getActions = function getActions() { common.query("actions", { success: function (data) { $("#actionsFormField").empty(); @@ -57,7 +57,7 @@ define(["jquery", "app/common"], $("#actionsFormField").html( items.map((e) => e.html).join("")); }, - server: (checked_server === "All SERVERS") ? "local" : checked_server + server: common.getServer() }); }; @@ -109,7 +109,7 @@ define(["jquery", "app/common"], } }; - ui.getMaps = function (checked_server) { + ui.getMaps = function () { const $listmaps = $("#listMaps"); $listmaps.closest(".card").hide(); common.query("maps", { @@ -135,7 +135,7 @@ define(["jquery", "app/common"], $tbody.appendTo($listmaps); $listmaps.closest(".card").show(); }, - server: (checked_server === "All SERVERS") ? "local" : checked_server + server: common.getServer() }); }; @@ -158,7 +158,6 @@ define(["jquery", "app/common"], // Modal form for maps $(document).on("click", "[data-bs-toggle=\"modal\"]", function () { - const checked_server = common.getSelector("selSrv"); const item = $(this).data("item"); common.query("getmap", { headers: { @@ -197,7 +196,7 @@ define(["jquery", "app/common"], $("#modalDialog").modal("show"); }, errorMessage: "Cannot receive maps data", - server: (checked_server === "All SERVERS") ? "local" : checked_server + server: common.getServer() }); return false; }); |