From 4c7d0f2f469b56088af9d53ff782f9304b5c67b3 Mon Sep 17 00:00:00 2001 From: moisseev Date: Sun, 9 Aug 2020 14:32:10 +0300 Subject: [PATCH] [WebUI] Add fuzzy hashes info --- interface/index.html | 19 +++++++++++++++++++ interface/js/app/stats.js | 20 +++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) 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); } } -- 2.39.5