aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/app/selectors.js
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-01-28 23:42:27 +0600
committerGitHub <noreply@github.com>2024-01-28 23:42:27 +0600
commita06f4c1439fda74bc221812a3ecbfba0a285dffd (patch)
treeb2819e59ddf767ecbc2a0b2faca6fc2dbd61b08a /interface/js/app/selectors.js
parent4adcf12295934fa5d64b4867ebd67e8dba325ae1 (diff)
parentf44458b19aae42fd58e6faca3af15b1b9b7d3833 (diff)
downloadrspamd-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/selectors.js')
-rw-r--r--interface/js/app/selectors.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/interface/js/app/selectors.js b/interface/js/app/selectors.js
index 53240d838..c2b8b27e5 100644
--- a/interface/js/app/selectors.js
+++ b/interface/js/app/selectors.js
@@ -10,11 +10,6 @@ define(["jquery", "app/common"],
));
}
- function get_server() {
- const checked_server = common.getSelector("selSrv");
- return (checked_server === "All SERVERS") ? "local" : checked_server;
- }
-
function checkMsg(data) {
const selector = $("#selectorsSelArea").val();
common.query("plugins/selectors/check_message?selector=" + encodeURIComponent(selector), {
@@ -30,7 +25,7 @@ define(["jquery", "app/common"],
common.alertMessage("alert-error", "Unexpected error processing message");
}
},
- server: get_server()
+ server: common.getServer()
});
}
@@ -50,7 +45,7 @@ define(["jquery", "app/common"],
toggle_form_group_class("valid", "invalid");
}
},
- server: get_server()
+ server: common.getServer()
});
} else {
$("#selectorsSelArea").removeClass("is-valid is-invalid");
@@ -76,7 +71,7 @@ define(["jquery", "app/common"],
const json = neighbours_status[0].data;
build_table_from_json(json, "#selectorsTable-" + list);
},
- server: get_server()
+ server: common.getServer()
});
}