fix: Present warning text for pool replacement devices (that they will be overwritten)

This commit is contained in:
Tom Mortensen
2024-05-13 10:59:04 -07:00
parent 69bd331d2d
commit 70d3d5a656

View File

@@ -184,7 +184,7 @@ function array_offline(&$disk, $pool='') {
$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 (!str_contains(_var($diks[$pool],'state'),'ERROR:')) {
if (_var($diks[$pool],'state')!='NEW_ARRAY') {
if (_var($disks[$pool],'state')!='NEW_ARRAY') {
if (in_array(_var($disk,'status'),$status)) $warning = $text;
}
}