Show localized numbers on the Settings->System page

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-05-10 12:57:00 +02:00
parent 08d63c8e26
commit 9696a77bf1

View File

@@ -59,9 +59,11 @@ function setMetrics(data, prefix) {
setMetrics(val, prefix + key + "-");
} else if (prefix === "sysinfo-dns-replies-") {
// Compute and display percentage of DNS replies in addition to the absolute value
$("#" + prefix + key).text(val + " (" + ((100 * val) / data.sum).toFixed(1) + "%)");
const lval = val.toLocaleString();
$("#" + prefix + key).text(lval + " (" + ((100 * val) / data.sum).toFixed(1) + "%)");
} else {
$("#" + prefix + key).text(val);
const lval = val.toLocaleString();
$("#" + prefix + key).text(lval);
}
}
}