mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 06:00:14 -06:00
31 lines
1.4 KiB
HTML
31 lines
1.4 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<link type="text/css" rel="stylesheet" href="/webGui/styles/default-fonts.css">
|
|
<style>
|
|
div.notice{background-color:#FFF6BF;text-align:center;height:80px;line-height:80px;border-top:2px solid #FFD324;border-bottom:2px solid #FFD324;font-family:arimo;font-size:18px;}
|
|
span.title{font-size:28px;text-transform:uppercase;display:block;}
|
|
</style>
|
|
<script src="/webGui/javascript/dynamix.js"></script>
|
|
<script>
|
|
var start = new Date();
|
|
|
|
function timer() {
|
|
var now = new Date();
|
|
return Math.round((now.getTime()-start.getTime())/1000);
|
|
}
|
|
function online() {
|
|
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttp',update:true},timeout:5000})
|
|
.done(function(){$('div.notice').html('<span class="title">Reboot</span>System is going down... '+timer()); setTimeout(online,5000);})
|
|
.fail(function(){$('div.notice').html('<span class="title">Reboot</span>System is rebooting... 0'); start=new Date(); setTimeout(offline,5000);});
|
|
}
|
|
function offline() {
|
|
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttp',update:true},timeout:5000})
|
|
.done(function(){location = '/Main';})
|
|
.fail(function(){$('div.notice').html('<span class="title">Reboot</span>System is rebooting... '+timer()); setTimeout(offline,0);});
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="online()"><div class='notice'><span class='title'>Reboot</span>System is going down... 0</div></body>
|
|
</html>
|