From 01fea8a0f039b7d19b0bb29550bed4d553112a90 Mon Sep 17 00:00:00 2001 From: bergware Date: Wed, 1 Nov 2023 21:22:01 +0100 Subject: [PATCH] Device_list: update help text for pools --- emhttp/plugins/dynamix/nchan/device_list | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix/nchan/device_list b/emhttp/plugins/dynamix/nchan/device_list index db03ad94e..249f6edb7 100755 --- a/emhttp/plugins/dynamix/nchan/device_list +++ b/emhttp/plugins/dynamix/nchan/device_list @@ -57,17 +57,19 @@ function device_info(&$disk,$online) { $extra = my_explode('~',$name)[1]; $fancyname = compress($extra ? '~'.my_disk(_($extra,3)) : my_disk(_($name,3)),16,5); $type = _var($disk,'type')=='Flash' ? $disk['type'] : 'Device'; + $pool = _var($disk,'type')=='Cache'; + $parity = _var($disk,'type')=='Parity'; $action = strpos(_var($disk,'color'),'blink')===false ? 'down' : 'up'; switch (_var($disk,'color')) { case 'green-on': $orb = 'circle'; $color = 'green'; $help = _('Normal operation, device is active'); break; case 'green-blink': $orb = 'circle'; $color = 'grey'; $help = _('Device is in standby mode (spun-down)'); break; case 'blue-on': $orb = 'square'; $color = 'blue'; $help = _('New device'); break; case 'blue-blink': $orb = 'square'; $color = 'grey'; $help = _('New device, in standby mode (spun-down)'); break; - case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = _var($disk,'type')=='Parity' ? _('Parity is invalid') : _('Device contents emulated'); break; - case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = _var($disk,'type')=='Parity' ? _('Parity is invalid, in standby mode (spun-down)') : _('Device contents emulated, in standby mode (spun-down)'); break; + case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = $pool ? _('Device contents invalid') : ($parity ? _('Parity is invalid') : _('Device contents emulated')); break; + case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = $pool ? _('Device contents invalid, in standby mode (spun-down)') : ($parity ? _('Parity is invalid, in standby mode (spun-down)') : _('Device contents emulated, in standby mode (spun-down)')); break; case 'red-on': - case 'red-blink': $orb = 'times'; $color = 'red'; $help = _var($disk,'type')=='Parity' ? _('Parity device is disabled') : _('Device is disabled, contents emulated'); break; - case 'red-off': $orb = 'times'; $color = 'red'; $help = _var($disk,'type')=='Parity' ? _('Parity device is missing') : _('Device is missing (disabled), contents emulated'); break; + case 'red-blink': $orb = 'times'; $color = 'red'; $help = $pool ? _('Device is disabled') : ($parity ? _('Parity device is disabled') : _('Device is disabled, contents emulated')); break; + case 'red-off': $orb = 'times'; $color = 'red'; $help = $pool ? _('Device is missing (disabled)') : ($parity ? _('Parity device is missing') : _('Device is missing (disabled), contents emulated')); break; case 'grey-off': $orb = 'square'; $color = 'grey'; $help = _('Device not present'); break; } $ctrl = '';