mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Show active clients instead of clients-ever-seen on the dashboard. When the two numbers are different, show both
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -384,7 +384,10 @@ function updateSummaryData(runOnce) {
|
||||
$.getJSON("/api/stats/summary", function (data) {
|
||||
var intl = new Intl.NumberFormat();
|
||||
glowIfChanged($("span#dns_queries"), intl.format(parseInt(data.queries.total, 10)));
|
||||
glowIfChanged($("span#total_clients"), intl.format(parseInt(data.clients.total, 10)));
|
||||
let clientsString = intl.format(parseInt(data.clients.active, 10));
|
||||
if (data.clients.active !== data.clients.total)
|
||||
clientsString += " / " + intl.format(parseInt(data.clients.total, 10));
|
||||
glowIfChanged($("span#total_clients"), clientsString);
|
||||
glowIfChanged($("span#blocked_queries"), intl.format(parseFloat(data.queries.blocked)));
|
||||
glowIfChanged(
|
||||
$("span#percent_blocked"),
|
||||
|
||||
Reference in New Issue
Block a user