mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 13:09:58 -06:00
38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?PHP
|
|
/* Copyright 2005-2016, Lime Technology
|
|
* Copyright 2012-2016, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<?
|
|
$var = parse_ini_file("state/var.ini");
|
|
|
|
switch ($var['fsState']) {
|
|
case 'Stopped':
|
|
echo '<span class="red strong">Array Stopped</span>'; break;
|
|
case 'Starting':
|
|
echo '<span class="orange strong">Array Starting</span>'; break;
|
|
default:
|
|
echo '<span class="green strong">Array Started</span>'; break;
|
|
}
|
|
if ($var['mdResync']) {
|
|
$mode = '';
|
|
if (strstr($var['mdResyncAction'],"recon")) {
|
|
$mode = 'Parity-Sync / Data-Rebuild';
|
|
} elseif (strstr($var['mdResyncAction'],"clear")) {
|
|
$mode = 'Clearing';
|
|
} elseif ($var['mdResyncAction']=="check") {
|
|
$mode = 'Read-Check';
|
|
} elseif (strstr($var['mdResyncAction'],"check")) {
|
|
$mode = 'Parity-Check';
|
|
}
|
|
echo '•<span class="orange strong">'.$mode.' '.number_format(($var['mdResyncPos']/($var['mdResync']/100+1)),1,$_POST['dot'],'').' %</span>';
|
|
if ($_POST['mode']<0) echo '#stop';
|
|
}
|
|
?>
|