Fixed incorrect display of BTRFS check for non-btrfs disks. Removed unused buttons.

This commit is contained in:
bergware
2017-03-25 20:53:52 +01:00
parent 97ea5dba09
commit f3b22b8ce1
+3 -25
View File
@@ -93,7 +93,6 @@ Partition format:
<?if ($disk['type']!="Parity"):?>
<?if ($disk['type']=="Data" || $disk['name']=="cache"):?>
Comments:
: <input type="text" name="diskComment.<?=$disk['idx'];?>" maxlength="256" value="<?=htmlspecialchars($disk['comment'])?>">
@@ -101,10 +100,8 @@ Comments:
> Enter anything you like, up to 256 characters.
<?endif;?>
File system status:
: <?=$disk['fsStatus']?><?if ($disk['fsError']) echo " - {$disk['fsError']}";?>&nbsp;
<?endif;?>
<?if ($disk['type']=="Data" || ($disk['type']=="Cache" && $var['SYS_CACHE_SLOTS']==1)):?>
<?if ($var['fsState']=="Stopped"):?>
@@ -117,7 +114,6 @@ File system type:
<?=mk_option($disk['fsType'], "reiserfs", "reiserfs")?>
<?=mk_option($disk['fsType'], "xfs", "xfs")?>
</select>
<?else:?>
File system type:
@@ -127,13 +123,11 @@ File system type:
<?=mk_option($disk['fsType'], "reiserfs", "reiserfs")?>
<?=mk_option($disk['fsType'], "xfs", "xfs")?>
</select> Array must be <span class="strong big">Stopped</span> to change
<?endif;?>
<?elseif ($disk['type']=="Cache" && $var['SYS_CACHE_SLOTS']>1):?>
File system type:
: <?=$disk['fsType'];?>&nbsp;
<?endif;?>
Spin down delay:
@@ -187,10 +181,8 @@ Critical disk temperature threshold (&deg;<?=$display['unit']?>):
> A value of zero will disable the critical threshold (including notifications).
<?if (($var['spinupGroups']=="yes")&&($disk['type']!="Cache")):?>
Spinup group(s):
: <input type="text" name="diskSpinupGroup.<?=$disk['idx'];?>" maxlength="256" value="<?=$disk['spinupGroup']?>">
<?endif;?>
&nbsp;
@@ -204,11 +196,10 @@ btrfs filesystem show:
: <?echo "<pre>".shell_exec("/sbin/btrfs filesystem show {$disk['uuid']}")."</pre>";?>
<?if ($disk['fsStatus']=="Mounted"):?>
btrfs filesystem df:
: <?echo "<pre>".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}")."</pre>";?>
<?endif;?>
<?if ($var['cacheSbNumDisks']>1):?>
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
<?if ($disk['fsStatus']=="Mounted"):?>
@@ -244,9 +235,6 @@ btrfs balance status:
<?endif;?>
<?else:?>
&nbsp;
: <input type="submit" value="Balance" disabled>
> **Balance** is only available when the Device is Mounted.
<?endif;?>
@@ -290,14 +278,12 @@ btrfs scrub status:
<?endif;?>
<?else:?>
&nbsp;
: <input type="submit" value="Scrub" disabled>
> **Scrub** is only available when the Device is Mounted.
<?endif;?>
</form>
<?endif?>
<?if ($disk['fsType']=="btrfs"):?>
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
<?if ($var['fsState']=="Started" && $var['startMode']=='Maintenance'):?>
<?exec("$docroot/webGui/scripts/btrfs_check status /dev/{$disk['deviceSb']} {$disk['id']}", $check_status, $retval);?>
@@ -340,13 +326,11 @@ btrfs check status:
<?endif;?>
<?else:?>
&nbsp;
: <input type="submit" value="Check" disabled>
> **Check** is only available when array is Started in **Mainenance** mode.
<?endif;?>
</form>
<?endif;?>
<?if ($disk['fsType']=="reiserfs"):?>
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
<?if ($var['fsState']=="Started" && $var['startMode']=='Maintenance'):?>
@@ -391,9 +375,6 @@ reiserfsck status:
<?endif;?>
<?else:?>
&nbsp;
: <input type="submit" value="Check" disabled>
> **Check** is only available when array is Started in **Mainenance** mode.
<?endif;?>
@@ -441,9 +422,6 @@ xfs_repair status:
<?endif;?>
<?else:?>
&nbsp;
: <input type="submit" value="Check" disabled>
> **Check** is only available when array is Started in **Mainenance** mode.
<?endif;?>