aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/history.js44
-rw-r--r--interface/js/app/rspamd.js59
2 files changed, 52 insertions, 51 deletions
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index 16d4b49d2..fa80a10cd 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -62,30 +62,30 @@ define(["jquery", "footable", "humanize"],
function preprocess_item(item) {
for (var prop in item) {
switch (prop) {
- case "rcpt_mime":
- case "rcpt_smtp":
- escape_HTML_array(item[prop]);
- break;
- case "symbols":
- Object.keys(item.symbols).map(function (key) {
- var sym = item.symbols[key];
- if (!sym.name) {
- sym.name = key;
- }
- sym.name = escapeHTML(sym.name);
- if (sym.description) {
- sym.description = escapeHTML(sym.description);
- }
+ case "rcpt_mime":
+ case "rcpt_smtp":
+ escape_HTML_array(item[prop]);
+ break;
+ case "symbols":
+ Object.keys(item.symbols).map(function (key) {
+ var sym = item.symbols[key];
+ if (!sym.name) {
+ sym.name = key;
+ }
+ sym.name = escapeHTML(sym.name);
+ if (sym.description) {
+ sym.description = escapeHTML(sym.description);
+ }
- if (sym.options) {
- escape_HTML_array(sym.options);
+ if (sym.options) {
+ escape_HTML_array(sym.options);
+ }
+ });
+ break;
+ default:
+ if (typeof (item[prop]) === "string") {
+ item[prop] = escapeHTML(item[prop]);
}
- });
- break;
- default:
- if (typeof (item[prop]) === "string") {
- item[prop] = escapeHTML(item[prop]);
- }
}
}
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 1e41afaaf..e7b86a9c2 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -83,37 +83,38 @@ function ($, D3pie, visibility, NProgress, tab_stat, tab_graph, tab_config,
}
switch (tab_id) {
- case "#status_nav":
- tab_stat.statWidgets(ui, graphs, checked_server);
- timer_id.status = Visibility.every(10000, function () {
+ case "#status_nav":
tab_stat.statWidgets(ui, graphs, checked_server);
- });
- break;
- case "#throughput_nav":
- tab_graph.draw(ui, graphs, tables, neighbours, checked_server, selData);
-
- var autoRefresh = {
- hourly: 60000,
- daily: 300000
- };
- timer_id.throughput = Visibility.every(autoRefresh[selData] || 3600000, function () {
+ timer_id.status = Visibility.every(10000, function () {
+ tab_stat.statWidgets(ui, graphs, checked_server);
+ });
+ break;
+ case "#throughput_nav":
tab_graph.draw(ui, graphs, tables, neighbours, checked_server, selData);
- });
- break;
- case "#configuration_nav":
- tab_config.getActions(ui, checked_server);
- tab_config.getMaps(ui, checked_server);
- break;
- case "#symbols_nav":
- tab_symbols.getSymbols(ui, tables, checked_server);
- break;
- case "#history_nav":
- tab_history.getHistory(ui, tables);
- tab_history.getErrors(ui, tables);
- break;
- case "#disconnect":
- disconnect();
- break;
+
+ var autoRefresh = {
+ hourly: 60000,
+ daily: 300000
+ };
+ timer_id.throughput = Visibility.every(autoRefresh[selData] || 3600000, function () {
+ tab_graph.draw(ui, graphs, tables, neighbours, checked_server, selData);
+ });
+ break;
+ case "#configuration_nav":
+ tab_config.getActions(ui, checked_server);
+ tab_config.getMaps(ui, checked_server);
+ break;
+ case "#symbols_nav":
+ tab_symbols.getSymbols(ui, tables, checked_server);
+ break;
+ case "#history_nav":
+ tab_history.getHistory(ui, tables);
+ tab_history.getErrors(ui, tables);
+ break;
+ case "#disconnect":
+ disconnect();
+ break;
+ default:
}
setTimeout(function () {