Fix build issue - release

This commit is contained in:
Sebastien
2020-09-08 17:11:52 -04:00
parent 2eb995d621
commit 5ff673ae7d
2 changed files with 16 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
idf_component_register(SRC_DIRS .
INCLUDE_DIRS .
INCLUDE_DIRS . ${IDF_PATH}/components/driver
REQUIRES json tools platform_config display
)

View File

@@ -65,7 +65,17 @@ var RefreshAPIIntervalActive = false;
var LastRecoveryState=null;
var LastCommandsState=null;
var output = '';
function delay_msg(t, v) {
return new Promise(function(resolve) {
setTimeout(resolve.bind(null, v), t)
});
}
Promise.prototype.delay = function(t) {
return this.then(function(v) {
return delay_msg(t, v);
});
}
function stopCheckStatusInterval(){
if(checkStatusInterval != null){
clearTimeout(checkStatusInterval);
@@ -1096,7 +1106,10 @@ function runCommand(button,reboot) {
},
complete: function(response) {
console.log('reboot call completed');
Promise.resolve().delay(5000).then(function(v) {
console.log('Getting updated commands');
getCommands();
});
}
});
}
@@ -1177,7 +1190,7 @@ function getCommands() {
}
else {
advancedtabhtml+='<br>'+innerhtml;
advancedtabhtml+='<div class="buttons"><input id="btn-'+ command.name + '" type="button" class="btn btn-danger btn-sm" cmdname="'+command.name+'" value="'+command.name+'" onclick="runCommand(this);"></div></div><td></tr>';
advancedtabhtml+='<div class="buttons"><input id="btn-'+ command.name + '" type="button" class="btn btn-danger btn-sm" cmdname="'+command.name+'" value="'+command.name+'" onclick="runCommand(this, false);"></div></div><td></tr>';
}
}
});