diff --git a/plugins/dynamix/nchan/update_2 b/plugins/dynamix/nchan/update_2 index 644208634..af66d1414 100755 --- a/plugins/dynamix/nchan/update_2 +++ b/plugins/dynamix/nchan/update_2 @@ -159,8 +159,8 @@ function device_temp(&$disk, &$red, &$orange) { global $display; $spin = strpos($disk['color'],'blink')===false; $temp = $disk['temp']; - $hot = $disk['hotTemp'] ?? $display['hot']; - $max = $disk['maxTemp'] ?? $display['max']; + $hot = $disk['hotTemp'] ?? $display['hot'] ?? 0; + $max = $disk['maxTemp'] ?? $display['max'] ?? 0; $top = $display['top'] ?? 120; $heat = false; $color = 'green'; if (exceed($temp,$max,$top)) { @@ -299,9 +299,9 @@ while (true) { $echo[0] .= array_group('Data'); $echo[0] .= "\0".($error+$warning)."\0".($red+$orange)."\0".($fail+$smart)."\0".($full+$high); //pool devices - $error = $warning = $red = $orange = $fail = $smart = $full = $high = 0; $echo[1] = ''; foreach (pools_filter($disks) as $pool) if ($disks[$pool]['devices']) { + $error = $warning = $red = $orange = $fail = $smart = $full = $high = 0; $echo[1] .= array_group('Cache',$pool); $echo[1] .= "\0".($error+$warning)."\0".($red+$orange)."\0".($fail+$smart)."\0".($full+$high)."\r"; }