mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
@@ -228,13 +228,14 @@ $(function(){
|
||||
<input type="hidden" name="startState" value="<?=htmlspecialchars($var['mdState'])?>">
|
||||
<input type="hidden" name="file" value="">
|
||||
<table class="array_status">
|
||||
<?$parity = $var['mdResync']>0 ? '<small>Disabled -- Parity operation is running</small>' : '';
|
||||
$mover = file_exists('/var/run/mover.pid') ? '<small>Disabled -- Mover is running</small>' : '';
|
||||
<?$parity = $var['mdResync']>0 ? '<br><small>Disabled -- Parity operation is running</small>' : '';
|
||||
$mover = file_exists('/var/run/mover.pid') ? '<br><small>Disabled -- Mover is running</small>' : '';
|
||||
$btrfs = exec('pgrep -cf /sbin/btrfs') ? '<br><small>Disabled -- BTRFS operation is running</small>' : '';
|
||||
switch ($var['fsState']):
|
||||
case "Started":?>
|
||||
<tr><td><?status_indicator()?><span class="strong big">Started<?=(($var['startMode']=='Maintenance')?' - Maintenance Mode':'')?></span></td>
|
||||
<td><input type="button" value="Stop" onclick="stopArray(this.form)"<?if ($parity||$mover):?> disabled<?endif;?>></td>
|
||||
<td><strong>Stop</strong> will take the array off-line.<?=$parity?"<br>$parity":($mover?"<br>$mover":"")?></td></tr>
|
||||
<td><input type="button" value="Stop" onclick="stopArray(this.form)"<?if ($parity||$mover||$btrfs):?> disabled<?endif;?>></td>
|
||||
<td id="stop"><strong>Stop</strong> will take the array off-line.<?=$parity?:$mover?:$btrfs?:''?></td></tr>
|
||||
<? if ($var['fsNumUnmountable']>0):?>
|
||||
<tr><td><strong>Unmountable disk<?=$var['fsNumUnmountable']==1?'':'s'?> present:</strong><br>
|
||||
<? foreach ($disks as $disk) if (strpos($disk['fsStatus'],'Unmountable')!==false)
|
||||
@@ -301,7 +302,7 @@ $(function(){
|
||||
<tr><td>Clearing in progress.</td><td><input type="button" id="cancelButton" value="Cancel" onclick="stopParity(this.form,'Clearing')"></td>
|
||||
<td id="cancelText"><strong>Cancel</strong> will stop Clearing.</td></tr>
|
||||
<? endif;?>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,600,false)"></td><td>Last check in progress.</td></tr>
|
||||
<tr><td></td><td><input type="button" value="History" onclick="openBox('/webGui/include/ParityHistory.php','Parity/Read-Check History',600,600,false)"></td><td>Current operation started on <strong><?=my_time($var['sbUpdated'])?></strong></td></tr>
|
||||
<tr><td>Total size:</td><td id="line0"></td><td></td></tr>
|
||||
<tr><td>Elapsed time:</td><td id="line1"></td><td></td></tr>
|
||||
<tr><td>Current position:</td><td id="line2"></td><td></td></tr>
|
||||
@@ -474,6 +475,24 @@ $(function(){
|
||||
<?
|
||||
if (isset($display['sleep'])) @include $display['sleep'];
|
||||
?>
|
||||
<?if ($btrfs):?>
|
||||
<script>
|
||||
function enable_stop() {
|
||||
$.get('/webGui/include/ReloadPage.php',{btrfs:'btrfs'},function(data) {
|
||||
switch (data) {
|
||||
case 'disable':
|
||||
setTimeout(enable_stop,5000);
|
||||
break;
|
||||
case 'enable':
|
||||
var stop = $('td#stop');
|
||||
stop.html(stop.html().replace("<?=$btrfs?>",""));
|
||||
$('input[value="Stop"]').prop('disabled',false);
|
||||
break;}
|
||||
});
|
||||
}
|
||||
enable_stop();
|
||||
</script>
|
||||
<?endif;?>
|
||||
|
||||
> **Colored Status Indicator** the significance of the color indicator of the *Array* is as follows:
|
||||
>
|
||||
|
||||
@@ -89,8 +89,22 @@ function updateDNS(button) {
|
||||
|
||||
$.post("/webGui/include/UpdateDNS.php",success).fail(failure);
|
||||
}
|
||||
function checkPorts(form) {
|
||||
if (!form.PORT.value) form.PORT.value = 80;
|
||||
if (!form.PORTSSL.value) form.PORTSSL.value = 443;
|
||||
var http = form.PORT.value < 1024 && form.PORT.value != 80;
|
||||
var https = form.PORTSSL.value < 1024 && form.PORTSSL.value != 443;
|
||||
if (http || https) {
|
||||
var text = http ? 'HTTP' : '';
|
||||
text = https ? (text ? 'HTTP & HTTPS' : 'HTTPS') : text;
|
||||
swal({title:'Non-recommended port',text:text+' port may conflict with well known services',type:'warning',showCancelButton:true},function(){form.submit();});
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form markdown="1" name="SSLSettings" method="POST" action="/update.htm" target="progressFrame">
|
||||
<input type="hidden" name="changePorts" value="apply">
|
||||
Use SSL/TLS:
|
||||
: <select name="USE_SSL" size="1" class="narrow">
|
||||
<?=mk_option($var['USE_SSL'], "auto", "Auto")?>
|
||||
@@ -156,7 +170,7 @@ Local TLD:
|
||||
> Enter your local Top Level Domain. May be blank.
|
||||
|
||||
|
||||
: <input type="submit" name="changePorts" value="Apply"><input type="button" value="Done" onclick="done()">
|
||||
: <input type="button" value="Apply" onclick="checkPorts(this.form)"><input type="button" value="Done" onclick="done()">
|
||||
|
||||
</form>
|
||||
<form markdown="1" name="Provision" method="POST" action="/update.htm" target="progressFrame">
|
||||
|
||||
@@ -402,7 +402,7 @@ case 'open':
|
||||
case 'parity':
|
||||
$data = [];
|
||||
if ($var['mdResync']>0) {
|
||||
$data[] = my_scale($var['mdResync']*1024,$unit)." $unit";
|
||||
$data[] = my_scale($var['mdResync']*1024,$unit,-1)." $unit";
|
||||
$data[] = my_clock(floor((time()-$var['sbUpdated'])/60));
|
||||
$data[] = my_scale($var['mdResyncPos']*1024,$unit)." $unit (".number_format(($var['mdResyncPos']/($var['mdResync']/100+1)),1,substr($display['number'],0,1),'')." %)";
|
||||
$data[] = my_scale($var['mdResyncDb']*1024/$var['mdResyncDt'],$unit, 1)." $unit/sec";
|
||||
|
||||
@@ -11,16 +11,20 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$var = parse_ini_file("state/var.ini");
|
||||
switch ($var['fsState']) {
|
||||
case 'Copying':
|
||||
echo "<strong>Copying, {$var['fsCopyPrcnt']}% complete...</strong>";
|
||||
break;
|
||||
case 'Clearing':
|
||||
echo "<strong>Clearing, {$var['fsClearPrcnt']}% complete...</strong>";
|
||||
break;
|
||||
default:
|
||||
echo substr($var['fsState'],-3)=='ing' ? 'wait' : 'stop';
|
||||
break;
|
||||
if (empty($_GET['btrfs'])) {
|
||||
$var = parse_ini_file("state/var.ini");
|
||||
switch ($var['fsState']) {
|
||||
case 'Copying':
|
||||
echo "<strong>Copying, {$var['fsCopyPrcnt']}% complete...</strong>";
|
||||
break;
|
||||
case 'Clearing':
|
||||
echo "<strong>Clearing, {$var['fsClearPrcnt']}% complete...</strong>";
|
||||
break;
|
||||
default:
|
||||
echo substr($var['fsState'],-3)=='ing' ? 'wait' : 'stop';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
echo exec('pgrep -cf /sbin/btrfs')>0 ? 'disable' : 'enable';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user