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 }; appData.views.section = { otp: true };
} }
, status: function () { , status: function () {
function exitState() {
clearInterval(tok);
}
function updateStatus() { function updateStatus() {
return api.status().then(function (status) { 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 wilddomains = [];
var rootdomains = []; var rootdomains = [];
var subdomains = []; var subdomains = [];
@ -298,9 +305,7 @@ var appStates = {
return updateStatus().then(function () { return updateStatus().then(function () {
appData.views.section = { status: true }; appData.views.section = { status: true };
return function cancelState() { return exitState;
clearInterval(tok);
};
}); });
} }
}; };