Show parity and mover schedules unconditionally, but give warning when missing items

This commit is contained in:
bergware
2017-10-07 08:12:52 +02:00
parent fd636d598c
commit 01e736745b
2 changed files with 9 additions and 9 deletions

View File

@@ -15,15 +15,16 @@ Tag="calendar-check-o"
*/
?>
<?
$disabled = '';
if (empty($disks['cache']) || $disks['cache']['status']=='DISK_NP') {
echo "<span class='big orange-text'>No Cache disk present!</span>";
return;
echo "<p class='notice'>No Cache disk present!</p>";
$disabled = 'disabled';
} elseif ($var['shareCacheEnabled']!='yes') {
echo "<span class='big orange-text'>Cache disk not enabled!</span>";
return;
echo "<p class='notice'>Cache disk not enabled!</p>";
$disabled = 'disabled';
} elseif ($var['shareUser']=='-') {
echo "<span class='big orange-text'>User shares not enabled!</span>";
return;
echo "<p class='notice'>User shares not enabled!</p>";
$disabled = 'disabled';
}
$cron = explode(' ',$var['shareMoverSchedule']);
$move = $cron[2]!='*' ? 3 : ($cron[4]!='*' ? 2 : (substr($cron[1],0,1)!='*' ? 1 : 0));
@@ -127,6 +128,6 @@ Mover logging:
<?if (file_exists("/var/run/mover.pid")):?>
: <input type="submit" name="cmdStartMover" value="Move now" disabled> Mover is running.
<?else:?>
: <input type="submit" name="cmdStartMover" value="Move now"> Click to invoke the Mover.
: <input type="submit" name="cmdStartMover" value="Move now"<?=$disabled?>> Click to invoke the Mover.
<?endif;?>
</form>

View File

@@ -16,8 +16,7 @@ Tag="calendar"
?>
<?
if ($disks['parity']['status']=='DISK_NP_DSBL' && $disks['parity2']['status']=='DISK_NP_DSBL') {
echo "<span class='big orange-text'>No Parity disk present!</span>";
return;
echo "<p class='notice'>No Parity disk present!</p>";
}
$width = strstr('gray,azure',$display['theme']) ? [166,305]:[131,300];
$mode = ['Disabled','Daily','Weekly','Monthly','Yearly','Custom'];