Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions emhttp/plugins/dynamix/ArrayOperation.page
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ mymonitor.on('message', function(state) {
<?if (_var($var,'shareUser') == 'e' && $pool_devices):?>
$('#mover-button').prop('disabled',false);
$('#mover-text').html("<b>_(Move)_</b> _(will immediately invoke the Mover)_.&nbsp;<a href=\"/Main/Settings/Scheduler\"<?if($tabbed):?> onclick=\"$.cookie('one','tab2')\"<?endif;?>>(_(Schedule)_)</a>");
<?endif;?>
<?if (_var($var,'shareUser') == 'e' && !$pool_devices):?>
$('#mover-button').prop('disabled',false);
$('#mover-text').html("<b>_(Empty)_</b> _(will immediately invoke the Mover to Empty a disk)_.&nbsp;<a href=\"/Main/Settings/Scheduler\"<?if($tabbed):?> onclick=\"$.cookie('one','tab2')\"<?endif;?>>(_(Schedule)_)</a>");
<?endif;?>
break;
case '1': // parity running
Expand All @@ -406,6 +410,10 @@ mymonitor.on('message', function(state) {
<?if (_var($var,'shareUser') == 'e' && $pool_devices):?>
$('#mover-button').prop('disabled',true);
$('#mover-text').html("_(Disabled)_ -- _(Parity operation is running)_");
<?endif;?>
<?if (_var($var,'shareUser') == 'e' && !$pool_devices):?>
$('#mover-button').prop('disabled',true);
$('#mover-text').html("<b>_(Empty)_</b> _(will immediately invoke the Mover to Empty a disk)_.&nbsp;<a href=\"/Main/Settings/Scheduler\"<?if($tabbed):?> onclick=\"$.cookie('one','tab2')\"<?endif;?>>(_(Schedule)_)</a>");
<?endif;?>
break;
case '2': // mover running
Expand All @@ -414,6 +422,10 @@ mymonitor.on('message', function(state) {
<?if (_var($var,'shareUser') == 'e' && $pool_devices):?>
$('#mover-button').prop('disabled',true);
$('#mover-text').html("_(Disabled)_ - _(Mover is running)_.");
<?endif;?>
<?if (_var($var,'shareUser') == 'e' && !$pool_devices):?>
$('#mover-button').prop('disabled',true);
$('#mover-text').html("<b>_(Empty)_</b> _(will immediately invoke the Mover to Empty a disk)_.&nbsp;<a href=\"/Main/Settings/Scheduler\"<?if($tabbed):?> onclick=\"$.cookie('one','tab2')\"<?endif;?>>(_(Schedule)_)</a>");
<?endif;?>
break;
case '3': // btrfs running
Expand All @@ -422,6 +434,10 @@ mymonitor.on('message', function(state) {
<?if (_var($var,'shareUser') == 'e' && $pool_devices):?>
$('#mover-button').prop('disabled',true);
$('#mover-text').html("_(Disabled)_ -- _(BTRFS operation is running)_");
<?endif;?>
<?if (_var($var,'shareUser') == 'e' && !$pool_devices):?>
$('#mover-button').prop('disabled',true);
$('#mover-text').html("<b>_(Empty)_</b> _(will immediately invoke the Mover to Empty a disk)_.&nbsp;<a href=\"/Main/Settings/Scheduler\"<?if($tabbed):?> onclick=\"$.cookie('one','tab2')\"<?endif;?>>(_(Schedule)_)</a>");
<?endif;?>
break;
}
Expand Down Expand Up @@ -832,6 +848,13 @@ endswitch;
</table>
</form>
<?endif;?>
<?if (_var($var,'shareUser') == 'e' && !$pool_devices):?>
<form name="mover_schedule" method="POST" action="/update.htm" target="progressFrame">
<table markdown="1" class="ArrayOperation-Table array_status noshift">
<tr><td></td><td><input type="submit" id="mover-button" name="cmdStartMover" value="_(Empty)_"></td><td id="mover-text"></td></tr>
</table>
</form>
<?endif;?>
<?elseif ($wrong && $keyfile):?>
<form name="delete_keyfile" method="POST" action="/update.php" target="progressFrame">
<input type="hidden" name="#file" value="unused">
Expand Down
12 changes: 7 additions & 5 deletions emhttp/plugins/dynamix/MoverSettings.page
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ Tag="calendar-check-o"
$mode = ['Disabled','Hourly','Daily','Weekly','Monthly'];
$days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
$setup = true;
$buttontext = _('Move now');
if (!$pool_devices) {
echo "<p class='notice'>"._('No Cache device present')."!</p>";
$setup = false;
echo "<p class='notice'>"._('No Cache device present only empty function will run')."!</p>";
$setup = true;
$buttontext = _('Empty now');
} elseif ($var['shareUser']=='-') {
echo "<p class='notice'>"._('User shares not enabled')."!</p>";
$setup = false;
}
}
if (empty($var['shareMoverSchedule'])) {
$cron = explode(' ', "* * * * *");
$move = 0;
} else {
$cron = explode(' ', $var['shareMoverSchedule']);
$move = $cron[2]!='*' ? 4 : ($cron[4]!='*' ? 3 : (substr($cron[1],0,1)!='*' ? 2 : 1));
}
$showMoverButton = $setup && $pool_devices;
$showMoverButton = $setup;
$moverRunning = file_exists('/var/run/mover.pid');
?>
<script>
Expand Down Expand Up @@ -138,7 +140,7 @@ _(Mover logging)_:
<input type="submit" name="changeMover" value="_(Apply)_" disabled>
<input type="button" value="_(Done)_" onclick="done()">
<?if ($showMoverButton):?>
<input type="submit" name="cmdStartMover" value="_(Move now)_"<?if ($moverRunning):?> disabled<?endif;?>>
<input type="submit" name="cmdStartMover" value="<?=$buttontext?>"<?if ($moverRunning):?> disabled<?endif;?>>
<?if ($moverRunning):?><span>_(Mover is running)_</span><?endif;?>
<?endif;?>
</span>
Expand Down
Loading