show error when status is error
This commit is contained in:
parent
08c18b8c94
commit
b18a6aa01c
|
@ -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);
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue