</table>
</div>
</div>
+ <div class="card bg-light shadow my-3">
+ <div class="card-header text-secondary py-2">
+ <span class="icon mr-3"><i class="fas fa-hashtag"></i></span>
+ <span class="h6 font-weight-bolder my-2">Fuzzy hashes</span>
+ </div>
+ <div class="card-body p-0 table-responsive">
+ <table class="table status-table table-sm table-bordered text-nowrap mb-0" id="fuzzyTable">
+ <thead class="text-secondary">
+ <tr>
+ <th>Server name</th>
+ <th>Storage</th>
+ <th>Hashes</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
</div>
<div class="col-lg-6">
<div class="card bg-light shadow my-3">
(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);
}
}