From 13c9915305f3e3164a36eae2cdeec5ac0691c726 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 26 Nov 2023 10:19:10 +0100 Subject: [PATCH] Enhanced boot page --- emhttp/plugins/dynamix/include/Boot.php | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/emhttp/plugins/dynamix/include/Boot.php b/emhttp/plugins/dynamix/include/Boot.php index a88181476..f5a216743 100644 --- a/emhttp/plugins/dynamix/include/Boot.php +++ b/emhttp/plugins/dynamix/include/Boot.php @@ -111,27 +111,27 @@ function shutdown_now() { } function reboot_online() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000}) - .done(function(){ - $('#system').html("... "+timer()); - setTimeout(reboot_online,5000); - }) - .fail(function(){start=new Date(); setTimeout(reboot_offline,5000);}); + .done(function(){ + $('#system').html("... "+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:'emhttpd',update:true},timeout:5000}) - .done(function(){location = '/Main';}) - .fail(function(){ - $('#system').html("... "+timer()); - setTimeout(reboot_offline,1000); - }); + .done(function(){location = '/Main';}) + .fail(function(){ + $('#system').html("... "+timer()); + setTimeout(reboot_offline,1000); + }); } function shutdown_online() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000}) - .done(function(){ - $('#system').html("... "+timer()); - setTimeout(shutdown_online,5000); - }) - .fail(function(){start=new Date(); setTimeout(shutdown_offline,5000);}); + .done(function(){ + $('#system').html("... "+timer()); + setTimeout(shutdown_online,5000); + }) + .fail(function(){start=new Date(); setTimeout(shutdown_offline,5000);}); } function shutdown_offline() { var time = timer(); @@ -145,8 +145,8 @@ function shutdown_offline() { } function power_on() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000}) - .done(function(){location = '/Main';}) - .fail(function(){setTimeout(power_on,1000);}); + .done(function(){location = '/Main';}) + .fail(function(){setTimeout(power_on,1000);}); } $(document).ajaxSend(function(elm, xhr, s){ if (s.type == "POST") {