Enhancement: add reboot button to nvs editor

The nvs editor will now allow rebooting to the currently active
partition
This commit is contained in:
Sebastien
2019-11-01 10:18:41 -04:00
parent f6d470d266
commit 4df1698722
6 changed files with 32 additions and 10 deletions

View File

@@ -210,7 +210,7 @@ $(document).ready(function(){
console.log('sent config JSON with headers:', autoexec);
console.log('now triggering reboot');
$.ajax({
url: '/reboot.json',
url: '/reboot_ota.json',
dataType: 'text',
method: 'POST',
cache: false,
@@ -439,7 +439,10 @@ $(document).ready(function(){
$('#boot-button').on("click", function(){
enableStatusTimer = true;
});
$('#reboot-button').on("click", function(){
enableStatusTimer = true;
});
$('#updateAP').on("click", function(){
refreshAP(true);
console.log("refresh AP");
@@ -656,7 +659,7 @@ function checkStatus(){
$("footer.footer").removeClass('sl');
$("footer.footer").addClass('recovery');
$("#boot-button").html('Reboot');
$("#boot-form").attr('action', '/reboot.json');
$("#boot-form").attr('action', '/reboot_ota.json');
enableStatusTimer = true;
} else {
recovery = false;