mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Add CPU usage percentage to the Load tooltip
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -344,7 +344,9 @@ function updateSystemInfo() {
|
||||
);
|
||||
$("#cpu").prop(
|
||||
"title",
|
||||
"Load averages for the past 1, 5, and 15 minutes\non a system with " +
|
||||
"CPU usage: " +
|
||||
system.cpu["%cpu"].toFixed(1) +
|
||||
"%\nLoad averages for the past 1, 5, and 15 minutes\non a system with " +
|
||||
system.cpu.nprocs +
|
||||
" core" +
|
||||
(system.cpu.nprocs > 1 ? "s" : "") +
|
||||
@@ -352,7 +354,7 @@ function updateSystemInfo() {
|
||||
system.procs +
|
||||
" processes" +
|
||||
(system.cpu.load.raw[0] > system.cpu.nprocs
|
||||
? " (load is higher than the number of cores)"
|
||||
? "\n(load is higher than the number of cores)"
|
||||
: "")
|
||||
);
|
||||
$("#sysinfo-cpu").text(
|
||||
|
||||
Reference in New Issue
Block a user