Dashboard: allow negative temps to show

This commit is contained in:
bergware
2023-12-09 15:07:01 +01:00
parent 20db70bc3a
commit 46726bfa2e

View File

@@ -171,7 +171,7 @@ function device_temp(&$disk, &$red, &$orange) {
$max = _var($disk,'maxTemp',-1)>=0 ? $disk['maxTemp'] : ($maxNVME>=0 ? $maxNVME : (_var($disk,'rotational',1)==0 && $display['maxssd']>=0 ? $display['maxssd'] : $display['max']));
$top = $display['top'] ?? 120;
$color= 'green';
if (exceed($temp,$max,$top)) {
if (exceed($temp,$max,$top) || $temp<0) {
$color = 'red'; $red++;
} elseif (exceed($temp,$hot,$top)) {
$color = 'orange'; $orange++;