mirror of
https://github.com/unraid/webgui.git
synced 2026-04-25 20:01:38 -05:00
Do not display device spin up/down icons for non-present devices.
This commit is contained in:
@@ -40,7 +40,7 @@ function device_info(&$disk,$online) {
|
||||
$fancyname = $disk['type']=='New' ? $name : my_disk($name);
|
||||
$type = $disk['type']=='Flash' || $disk['type']=='New' ? $disk['type'] : 'Device';
|
||||
$action = strpos($disk['color'],'blink')===false ? 'down' : 'up';
|
||||
if ($var['fsState']=='Started' && $type!='Flash') {
|
||||
if ($var['fsState']=='Started' && $type!='Flash' && strpos($disk['status'],'_NP')===false) {
|
||||
$cmd = $type=='New' ? "cmd=/webGui/scripts/hd_parm&arg1=$action&arg2=$name" : "cmdSpin$action=$name";
|
||||
$ctrl = "<a href='update.htm?$cmd&csrf_token={$var['csrf_token']}' title='Click to spin $action device' class='none' target='progressFrame' onclick=\"$.removeCookie('one',{path:'/'});\"><i class='fa fa-sort-$action spacing'></i></a>";
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user