mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 01:29:54 -06:00
Enhanced boot page
This commit is contained in:
@@ -59,10 +59,10 @@ boot.on('message', function(msg) {
|
||||
switch (ini['fsState']) {
|
||||
case 'Stopped' : var status = "<span class='red'><?=_('Array Stopped')?></span>"; break;
|
||||
case 'Started' : var status = "<span class='green'><?=_('Array Started')?></span>"; break;
|
||||
case 'Formatting': var status = "<span class='green'><?=_('Array Started')?></span>•<span class='orange tour'><?=_('Formatting device(s)')?></span>"; break;
|
||||
case 'Formatting': var status = "<span class='green'><?=_('Array Started')?></span><br><span class='orange'><?=_('Formatting device(s)')?></span>"; break;
|
||||
default : var status = "<span class='orange'>"+_('Array '+ini['fsState'])+"</span>";
|
||||
}
|
||||
if (ini['fsProgress']) status += "•<span class='blue tour'>"+_(ini['fsProgress'])+"</span>";
|
||||
status += ini['fsProgress'] ? "<br><span class='blue'>"+_(ini['fsProgress'])+"</span>" : "<br>";
|
||||
$('.sub1').html(status);
|
||||
});
|
||||
|
||||
@@ -158,18 +158,18 @@ $(document).ajaxSend(function(elm, xhr, s){
|
||||
</head>
|
||||
<?
|
||||
$safemode = '/boot/unraidsafemode';
|
||||
$progress = (_var($var,'fsProgress')!='') ? "•<span class='blue tour'>{$var['fsProgress']}</span>" : "";
|
||||
$progress = (_var($var,'fsProgress')!='') ? "<br><span class='blue'>{$var['fsProgress']}</span>" : "<br>";
|
||||
|
||||
switch (_var($_POST,'cmd','shutdown')) {
|
||||
case 'reboot':
|
||||
if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode);
|
||||
exec('/sbin/reboot -n');
|
||||
echo '<body onload="reboot_now()">';
|
||||
exec('/sbin/reboot -n');
|
||||
break;
|
||||
case 'shutdown':
|
||||
if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode);
|
||||
exec('/sbin/poweroff -n');
|
||||
echo '<body onload="shutdown_now()">';
|
||||
exec('/sbin/poweroff -n');
|
||||
break;
|
||||
}
|
||||
echo '<div class="notice"></div>';
|
||||
|
||||
Reference in New Issue
Block a user