diff options
Diffstat (limited to 'interface')
-rw-r--r-- | interface/js/app/rspamd.js | 7 | ||||
-rw-r--r-- | interface/js/app/symbols.js | 9 |
2 files changed, 6 insertions, 10 deletions
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index 644fbbed6..5472dc284 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -44,9 +44,6 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config, $("#statWidgets").empty(); $("#listMaps").empty(); $("#modalBody").empty(); - $("#historyLog tbody").remove(); - $("#errorsLog tbody").remove(); - $("#symbolsTable tbody").remove(); } function stopTimers() { @@ -120,7 +117,7 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config, tab_config.getMaps(ui, checked_server); break; case "#symbols_nav": - tab_symbols.getSymbols(ui, checked_server); + tab_symbols.getSymbols(ui, tables, checked_server); break; case "#history_nav": tab_history.getHistory(ui, tables); @@ -290,7 +287,7 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config, }); tab_config.setup(ui); tab_history.setup(ui, tables); - tab_symbols.setup(ui); + tab_symbols.setup(ui, tables); tab_upload.setup(ui); selData = tab_graph.setup(); }; diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index 04b661d99..a7d55902e 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -27,7 +27,6 @@ define(["jquery", "footable"], function ($) { "use strict"; - var ft = {}; var ui = {}; function getSelector(id) { @@ -144,7 +143,7 @@ define(["jquery", "footable"], return [items, distinct_groups]; } // @get symbols into modal form - ui.getSymbols = function (rspamd, checked_server) { + ui.getSymbols = function (rspamd, tables, checked_server) { rspamd.query("symbols", { success: function (json) { var data = json[0].data; @@ -197,7 +196,7 @@ define(["jquery", "footable"], } } }); - ft.symbols = FooTable.init("#symbolsTable", { + tables.symbols = FooTable.init("#symbolsTable", { columns: [ {sorted: true, direction: "ASC", name:"group", title:"Group", style:{"font-size":"11px"}}, {name:"symbol", title:"Symbol", style:{"font-size":"11px"}}, @@ -244,14 +243,14 @@ define(["jquery", "footable"], }); }; - ui.setup = function (rspamd) { + ui.setup = function (rspamd, tables) { $("#updateSymbols").on("click", function (e) { e.preventDefault(); var checked_server = getSelector("selSrv"); rspamd.query("symbols", { success: function (data) { var items = process_symbols_data(data[0].data)[0]; - ft.symbols.rows.load(items); + tables.symbols.rows.load(items); }, server: (checked_server === "All SERVERS") ? "local" : checked_server }); |