Dashboard: skip empty entries in graph

This commit is contained in:
bergware
2023-12-15 10:28:52 +01:00
parent da7fa2b830
commit 6b6dfab52b

View File

@@ -66,7 +66,7 @@ while (true) {
$data = @intval(exec(escapeshellarg($hook)));
if (!$data) continue;
$names[] = _(basename($hook)); // name of element (with translation)
$bytes[] = $data; // value in bytes of element (error -> 0)
$bytes[] = $data; // value in bytes of element
}
$services = $used-array_sum($bytes);
$meminfo[] = round(100*$used/$total)."%";