diff --git a/scripts/pi-hole/js/settings-system.js b/scripts/pi-hole/js/settings-system.js index 09233316..39cd2bd6 100644 --- a/scripts/pi-hole/js/settings-system.js +++ b/scripts/pi-hole/js/settings-system.js @@ -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 diff --git a/settings-system.lp b/settings-system.lp index 3d4ba256..bdcfe28e 100644 --- a/settings-system.lp +++ b/settings-system.lp @@ -170,37 +170,37 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r') - DNS cache size: + DNS cache size:   - DNS cache efficiency: + DNS cache utilization: -   +   - DNS cache insertions: + DNS cache insertions:   - DNS cache evictions: + DNS cache evictions:   - DNS cache expiries: + DNS cache expiries:   - Immortal DNS cache entries: + Immortal DNS cache entries: