mirror of
https://github.com/unraid/webgui.git
synced 2026-05-12 23:30:01 -05:00
Device_list: add warning to disabled disk
This commit is contained in:
@@ -183,15 +183,15 @@ function my_diskio($data) {
|
||||
function array_offline(&$disk, $pool='') {
|
||||
global $var, $disks;
|
||||
$echo = []; $warning = '';
|
||||
$text = "<span class='red-text'><em>"._('All existing data on this device will be OVERWRITTEN when array is Started')."</em></span>";
|
||||
if (strpos(_var($var,'mdState'),'ERROR:')===false) {
|
||||
$text = "<span class='red-text'><em>"._('All existing data on this device will be OVERWRITTEN when array is Started')."</em></span>";
|
||||
if (_var($disk,'type')=='Cache') {
|
||||
if (_var($disks[$pool],'uuid') && _var($disk,'status')=='DISK_NEW') $warning = $text;
|
||||
} else {
|
||||
if (_var($var,'mdState')=='NEW_ARRAY') {
|
||||
if (_var($disk,'type')=='Parity') $warning = $text;
|
||||
} elseif (_var($var,'mdNumInvalid',0)<=1) {
|
||||
if (in_array(_var($disk,'status'),['DISK_INVALID','DISK_DSBL_NEW','DISK_WRONG','DISK_NEW'])) $warning = $text;
|
||||
if (in_array(_var($disk,'status'),['DISK_DSBL','DISK_INVALID','DISK_DSBL_NEW','DISK_NEW','DISK_WRONG'])) $warning = $text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user