diff options
author | moisseev <moiseev@mezonplus.ru> | 2024-01-02 10:10:44 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2024-01-02 10:10:44 +0300 |
commit | f44458b19aae42fd58e6faca3af15b1b9b7d3833 (patch) | |
tree | 4501cad99fa98b1f6e89b64dd0ba404fa0738a86 /interface/js/app/config.js | |
parent | ecd96adf48982e99e3144fa0fdf74b83661fa544 (diff) | |
download | rspamd-f44458b19aae42fd58e6faca3af15b1b9b7d3833.tar.gz rspamd-f44458b19aae42fd58e6faca3af15b1b9b7d3833.zip |
[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; }); |