mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Convert q/s to q/m if there aren't all that many queries on this Pi-hole
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -234,13 +234,23 @@ function updateInfo() {
|
||||
}
|
||||
|
||||
function updateQueryFrequency(intl, frequency) {
|
||||
let freq = parseFloat(frequency);
|
||||
let unit = "q/s";
|
||||
let title = "Queries per second";
|
||||
if (freq < 0.5) {
|
||||
freq *= 60;
|
||||
unit = "q/m";
|
||||
title = "Queries per minute";
|
||||
}
|
||||
|
||||
$("#query_frequency")
|
||||
.html(
|
||||
'<i class="fa fa-fw fa-clock-rotate-left text-green-light"></i> ' +
|
||||
intl.format(parseFloat(frequency)) +
|
||||
" q/s"
|
||||
'<i class="fa fa-fw fa-gauge-high text-green-light"></i> ' +
|
||||
intl.format(freq) +
|
||||
" " +
|
||||
unit
|
||||
)
|
||||
.attr("title", "Queries per second");
|
||||
.attr("title", title);
|
||||
}
|
||||
|
||||
var ftlinfoTimer = null;
|
||||
|
||||
Reference in New Issue
Block a user