Merge pull request #1357 from bergware/master

StatusCheck: fixed: temperature thresholds
This commit is contained in:
tom mortensen
2023-06-12 12:10:53 -07:00
committed by GitHub
+3 -3
View File
@@ -93,10 +93,10 @@ function my_clock($time) {
function my_array(&$disk) {
global $data,$display,$error0,$error1,$error2,$error3;
$name = _var($disk,'name');
$max = $disk['maxTemp'] ?? $display['max'] ?? 0;
$hot = $disk['hotTemp'] ?? $display['hot'] ?? 0;
$max = _var($disk,'maxTemp')>=0 ? $disk['maxTemp'] : (_var($display,'max')>=0 ? $display['max'] : 0);
$hot = _var($disk,'hotTemp')>=0 ? $disk['hotTemp'] : (_var($display,'hot')>=0 ? $display['hot'] : 0);
if (strpos(_var($disk,'status'),'_NP')!==false) return false;
$temp = _var($disk,'temp','*');
$temp = _var($disk,'temp');
if ($max>0 && $temp>=$max) {
$fail = ' (disk is overheated';
$error0++;