show error when status is error

This commit is contained in:
AJ ONeal 2018-10-23 13:18:58 -06:00
parent 08c18b8c94
commit b18a6aa01c
1 changed files with 8 additions and 3 deletions

View File

@ -260,8 +260,15 @@ var appStates = {
appData.views.section = { otp: true };
}
, status: function () {
function exitState() {
clearInterval(tok);
}
function updateStatus() {
return api.status().then(function (status) {
if (status.error) {
appData.views.flash.error = status.error.message || JSON.stringify(status.error, null, 2);
}
var wilddomains = [];
var rootdomains = [];
var subdomains = [];
@ -298,9 +305,7 @@ var appStates = {
return updateStatus().then(function () {
appData.views.section = { status: true };
return function cancelState() {
clearInterval(tok);
};
return exitState;
});
}
};