diff options
author | moisseev <moiseev@mezonplus.ru> | 2020-08-09 14:32:10 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2020-08-09 14:32:10 +0300 |
commit | 4c7d0f2f469b56088af9d53ff782f9304b5c67b3 (patch) | |
tree | 891e5a83bd76ade130d34314a6ede080029674d2 /interface/js | |
parent | 1b34085ec52494c59b203908a4976d05aaa0f28f (diff) | |
download | rspamd-4c7d0f2f469b56088af9d53ff782f9304b5c67b3.tar.gz rspamd-4c7d0f2f469b56088af9d53ff782f9304b5c67b3.zip |
[WebUI] Add fuzzy hashes info
Diffstat (limited to 'interface/js')
-rw-r--r-- | interface/js/app/stats.js | 20 |
1 files changed, 17 insertions, 3 deletions
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 ? '<td rowspan="' + statfiles.length + '">' + server + "</td>" : "") + '<td class="' + cls + '">' + statfile.symbol + "</td>" + '<td class="' + cls + '">' + statfile.type + "</td>" + - '<td class="' + cls + '">' + statfile.revision + "</td>" + - '<td class="' + cls + '">' + statfile.users + "</td></tr>"); + '<td class="text-right ' + cls + '">' + statfile.revision + "</td>" + + '<td class="text-right ' + cls + '">' + statfile.users + "</td></tr>"); }); } - $("#bayesTable tbody").empty(); + + function addFuzzyStorage(server, storages) { + var i = 0; + $.each(storages, function (storage, hashes) { + $("#fuzzyTable tbody").append("<tr>" + + (i === 0 ? '<td rowspan="' + Object.keys(storages).length + '">' + server + "</td>" : "") + + "<td>" + storage + "</td>" + + '<td class="text-right">' + hashes + "</td></tr>"); + 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); } } |