Bug fixes

This commit is contained in:
bergware
2017-12-05 12:48:01 +01:00
parent c4b02a74c4
commit 5bd29ceb35
2 changed files with 6 additions and 6 deletions

View File

@@ -30,18 +30,18 @@ function timer() {
return Math.round((now.getTime()-start.getTime())/1000);
}
function reboot_online() {
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttp',update:true},timeout:5000})
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000})
.done(function(){$('div.notice').html('<span class="title">Reboot</span>System is going down... '+timer()); setTimeout(reboot_online,5000);})
.fail(function(){start=new Date(); setTimeout(reboot_offline,5000);});
}
function reboot_offline() {
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttp',update:true},timeout:5000})
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000})
.done(function(){location = '/Main';})
.fail(function(){$('div.notice').html('<span class="title">Reboot</span>System is rebooting... '+timer()); setTimeout(reboot_offline,1000);});
}
function shutdown_online() {
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttp',update:true},timeout:5000})
$.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000})
.done(function(){$('div.notice').html('<span class="title">Shutdown</span>System is going down... '+timer()); setTimeout(shutdown_online,5000);})
.fail(function(){start=new Date(); setTimeout(shutdown_offline,5000);});
}