]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Fix maps loading from neighbours 2417/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 12 Aug 2018 16:16:25 +0000 (19:16 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 12 Aug 2018 16:16:25 +0000 (19:16 +0300)
interface/js/app/config.js
interface/js/app/rspamd.js

index 1e0aa2829b5e097bac6ec4c76b5ee1813afa7efa..2f87525fa75fd1ec5fdd67bf05fcc44a7d5fa373 100644 (file)
@@ -166,9 +166,14 @@ define(["jquery"],
         };
 
         // @upload edited actions
-        ui.setup = function (rspamd, checked_server) {
+        ui.setup = function (rspamd) {
         // Modal form for maps
             $(document).on("click", "[data-toggle=\"modal\"]", function () {
+                function getSelector(id) {
+                    var e = document.getElementById(id);
+                    return e.options[e.selectedIndex].value;
+                }
+                var checked_server = getSelector("selSrv");
                 var item = $(this).data("item");
                 rspamd.query("getmap", {
                     headers: {
index e983e4074335b261cff20be63b91583d7e0af9a6..70f6fbfd5a247e3ab11c0c59a321b0a938a9c199 100644 (file)
@@ -286,7 +286,7 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
                 tabClick("#status_nav");
             }
         });
-        tab_config.setup(ui, checked_server);
+        tab_config.setup(ui);
         tab_symbols.setup(ui);
         tab_upload.setup(ui);
         selData = tab_graph.setup();