async transitions, but don't delay
This commit is contained in:
parent
2679a20d1c
commit
08c18b8c94
|
@ -260,9 +260,8 @@ var appStates = {
|
||||||
appData.views.section = { otp: true };
|
appData.views.section = { otp: true };
|
||||||
}
|
}
|
||||||
, status: function () {
|
, status: function () {
|
||||||
appData.views.section = { status: true };
|
function updateStatus() {
|
||||||
var tok = setInterval(function () {
|
return api.status().then(function (status) {
|
||||||
api.status().then(function (status) {
|
|
||||||
var wilddomains = [];
|
var wilddomains = [];
|
||||||
var rootdomains = [];
|
var rootdomains = [];
|
||||||
var subdomains = [];
|
var subdomains = [];
|
||||||
|
@ -294,11 +293,15 @@ var appStates = {
|
||||||
appData.newHttp.name = (appData.status.wildDomains[0] || {}).name;
|
appData.newHttp.name = (appData.status.wildDomains[0] || {}).name;
|
||||||
appData.state.ssh = (appData.status.ssh > 0) && appData.status.ssh || undefined;
|
appData.state.ssh = (appData.status.ssh > 0) && appData.status.ssh || undefined;
|
||||||
});
|
});
|
||||||
}, 2000);
|
}
|
||||||
|
var tok = setInterval(updateStatus, 2000);
|
||||||
|
|
||||||
|
return updateStatus().then(function () {
|
||||||
|
appData.views.section = { status: true };
|
||||||
return function cancelState() {
|
return function cancelState() {
|
||||||
clearInterval(tok);
|
clearInterval(tok);
|
||||||
};
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue