aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-19 11:15:58 +0100
committerGitHub <noreply@github.com>2018-07-19 11:15:58 +0100
commit762d1ff3f84a5844a779992c5afb8fba4a23148e (patch)
treede6b433d57f7e6c043f6e8e61416e0ac80b19979
parent751223e99c67541dd409b8fba843951da9875dcc (diff)
parent02044b46d9bf1733f24631c9dec6c6e5d2c185f9 (diff)
downloadrspamd-762d1ff3f84a5844a779992c5afb8fba4a23148e.tar.gz
rspamd-762d1ff3f84a5844a779992c5afb8fba4a23148e.zip
Merge pull request #2356 from moisseev/eslint
[WebUI] Fix symbols display in legacy history,
-rw-r--r--interface/js/app/history.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index bfbc83874..b46ffd655 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -70,7 +70,7 @@ define(["jquery", "footable", "humanize"],
if (!sym.name) {
sym.name = key;
}
- sym.name = EscapeHTML(key);
+ sym.name = EscapeHTML(sym.name);
if (sym.description) {
sym.description = EscapeHTML(sym.description);
}
@@ -129,6 +129,8 @@ define(["jquery", "footable", "humanize"],
return e1.name.localeCompare(e2.name);
};
+ $("#selSymOrder, label[for='selSymOrder']").show();
+
$.each(data.rows,
function (i, item) {
function more(p) {
@@ -218,6 +220,12 @@ define(["jquery", "footable", "humanize"],
function process_history_legacy(data) {
var items = [];
+ var compare = function (e1, e2) {
+ return e1.name.localeCompare(e2.name);
+ };
+
+ $("#selSymOrder, label[for='selSymOrder']").hide();
+
$.each(data, function (i, item) {
item.time = unix_time_format(item.unix_time);
preprocess_item(item);
@@ -227,6 +235,13 @@ define(["jquery", "footable", "humanize"],
},
value: item.scan_time
};
+ item.symbols = Object.keys(item.symbols)
+ .map(function (key) {
+ return item.symbols[key];
+ })
+ .sort(compare)
+ .map(function (e) { return e.name; })
+ .join(", ");
item.time = {
value: unix_time_format(item.unix_time),
options: {