mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Rename DNS cache efficiency -> utilization because this is more accurate
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -132,7 +132,8 @@ function setMetrics(data, prefix) {
|
||||
} else if (prefix === "sysinfo-dns-replies-") {
|
||||
// Compute and display percentage of DNS replies in addition to the absolute value
|
||||
const lval = val.toLocaleString();
|
||||
$("#" + prefix + key).text(lval + " (" + ((100 * val) / data.sum).toFixed(1) + "%)");
|
||||
const percent = (100 * val) / data.sum;
|
||||
$("#" + prefix + key).text(lval + " (" + percent.toFixed(1) + "%)");
|
||||
} else {
|
||||
const lval = val.toLocaleString();
|
||||
$("#" + prefix + key).text(lval);
|
||||
@@ -161,7 +162,7 @@ function updateMetrics() {
|
||||
// Set metrics
|
||||
setMetrics(metrics, "sysinfo-");
|
||||
|
||||
$("#cache-efficiency").text(((100 * cacheEntries) / cacheSize).toFixed(2) + "%");
|
||||
$("#cache-utilization").text(((100 * cacheEntries) / cacheSize).toFixed(1) + "%");
|
||||
|
||||
$("div[id^='sysinfo-metrics-overlay']").hide();
|
||||
// Update every 10 seconds
|
||||
|
||||
Reference in New Issue
Block a user