From: moisseev Date: Sun, 9 Aug 2020 11:32:10 +0000 (+0300) Subject: [WebUI] Add fuzzy hashes info X-Git-Tag: 2.6~162^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4c7d0f2f469b56088af9d53ff782f9304b5c67b3;p=rspamd.git [WebUI] Add fuzzy hashes info --- diff --git a/interface/index.html b/interface/index.html index 71314e282..bf241176b 100644 --- a/interface/index.html +++ b/interface/index.html @@ -145,6 +145,25 @@ +
+
+ + Fuzzy hashes +
+
+ + + + + + + + + + +
Server nameStorageHashes
+
+
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js index 532aec922..38578866e 100644 --- a/interface/js/app/stats.js +++ b/interface/js/app/stats.js @@ -159,19 +159,33 @@ define(["jquery", "d3pie"], (i === 0 ? '' + server + "" : "") + '' + statfile.symbol + "" + '' + statfile.type + "" + - '' + statfile.revision + "" + - '' + statfile.users + ""); + '' + statfile.revision + "" + + '' + statfile.users + ""); }); } - $("#bayesTable tbody").empty(); + + function addFuzzyStorage(server, storages) { + var i = 0; + $.each(storages, function (storage, hashes) { + $("#fuzzyTable tbody").append("" + + (i === 0 ? '' + server + "" : "") + + "" + storage + "" + + '' + hashes + ""); + i++; + }); + } + + $("#bayesTable tbody, #fuzzyTable tbody").empty(); if (checked_server === "All SERVERS") { $.each(servers, function (server, val) { if (server !== "All SERVERS") { addStatfiles(server, val.data.statfiles); + addFuzzyStorage(server, val.data.fuzzy_hashes); } }); } else { addStatfiles(checked_server, data.statfiles); + addFuzzyStorage(checked_server, data.fuzzy_hashes); } }