diff --git a/plugins/dynamix/include/DefaultPageLayout.php b/plugins/dynamix/include/DefaultPageLayout.php index bbe2690b7..cd3d46332 100644 --- a/plugins/dynamix/include/DefaultPageLayout.php +++ b/plugins/dynamix/include/DefaultPageLayout.php @@ -607,24 +607,18 @@ defaultPage.on('message', function(msg,meta) { case 1: // message field in footer var ini = parseINI(msg); - var state = ini['fsState']; - var progress = ini['fsProgress']; - var status; - if (state=='Stopped') { - status = " "; - } else if (state=='Started') { - status = " "; - } else if (state=='Formatting') { - status = " "; - } else { - status = " "+_('Array '+state)+""; + switch (ini['fsState']) { + case 'Stopped' : var status = " "; break; + case 'Started' : var status = " "; break; + case 'Formatting': var status = " "; break; + default : var status = " "+_('Array '+ini['fsState'])+""; } if (ini['mdResyncPos']>0) { var resync = ini['mdResyncAction'].split(/\s+/); switch (resync[0]) { case 'recon': var action = ['P','Q'].includes(resync[1]) ? "" : ""; break; - case 'clear': var action = ""; break; case 'check': var action = resync.length>1 ? "" : ""; break; + case 'clear': var action = ""; break; default : var action = ''; } action += " "+(ini['mdResyncPos']/(ini['mdResyncSize']/100+1)).toFixed(1)+" %"; @@ -632,7 +626,7 @@ defaultPage.on('message', function(msg,meta) { if (ini['mdResyncDt']==0) status += " • "; status += ""; } - if (progress) status += "•"+_(progress)+""; + if (ini['fsProgress']) status += "•"+_(ini['fsProgress'])+""; $('#statusbar').html(status); break; case 2: diff --git a/plugins/dynamix/nchan/update_2 b/plugins/dynamix/nchan/update_2 index c37b2f9f9..5722352ab 100755 --- a/plugins/dynamix/nchan/update_2 +++ b/plugins/dynamix/nchan/update_2 @@ -321,8 +321,8 @@ while (true) { $action = preg_split('/\s+/',$var['mdResyncAction']); switch ($action[0]) { case "recon": $mode = in_array($action[1],['P','Q']) ? 'Parity-Sync' : 'Data-Rebuild'; break; - case "clear": $mode = 'Disk-Clear'; break; case "check": $mode = count($action)>1 ? 'Parity-Check' : 'Read-Check'; break; + case "clear": $mode = 'Disk-Clear'; break; default : $mode = ''; break; } $echo[3] .= ""._($mode).' '._('in progress').'... '._('Completed').': '.number_format($spot/($size/100+1),1,$number[0],$number[1])." %."; diff --git a/plugins/dynamix/scripts/monitor b/plugins/dynamix/scripts/monitor index 4a7a1f35f..595d61bd2 100755 --- a/plugins/dynamix/scripts/monitor +++ b/plugins/dynamix/scripts/monitor @@ -244,8 +244,8 @@ if ($var['mdResyncPos']) { $action = preg_split('/\s+/',$var['mdResyncAction']); switch ($action[0]) { case 'recon': $last = in_array($action[1],['P','Q']) ? 'Parity-Sync' : 'Data-Rebuild'; break; - case 'clear': $last = 'Disk-Clear'; break; case 'check': $last = count($action)>1 ? 'Parity-Check' : 'Read-Check'; break; + case 'clear': $last = 'Disk-Clear'; break; default : $last = ''; } $info = "Size: ".my_scale($var['mdResyncSize']*1024,$unit)." $unit";