Suppress Parity2 in Dashboard when not used

This commit is contained in:
bergware
2016-10-01 11:46:26 +02:00
parent 44842725e3
commit 5af37a91cb
2 changed files with 4 additions and 7 deletions
+2 -5
View File
@@ -60,7 +60,7 @@ function plus($val,$word,$last) {
return $val>0?(($val||$last)?($val.' '.$word.($val!=1?'s':'').($last ?'':', ')):''):'';
}
function active_disks($disk) {
return $disk['status']!='DISK_NP' && preg_match('/^(Parity|Data|Cache)$/',$disk['type']);
return substr($disk['status'],0,7)!='DISK_NP' && preg_match('/^(Parity|Data|Cache)$/',$disk['type']);
}
$path = '/webGui/images';
$failed = ['FAILED','NOK'];
@@ -98,10 +98,7 @@ case 'disk':
my_insert($row3[$n],"<img src=$path/$state.png>");
break;
default:
if ($disk['type']=='Parity' && $disk['status']=='DISK_NP_DSBL')
my_insert($row3[$n],"<img src=$path/$state.png>"); //parity is really unassigned
else
my_insert($row4[$n],"<img src=$path/$state.png>");
my_insert($row4[$n],"<img src=$path/$state.png>");
break;}
$temp = $disk['temp'];
$hot = strlen($disk['hotTemp']) ? $disk['hotTemp'] : $_POST['hot'];