From b18a6aa01c91d4e88a8d26043d7b9381b6a5c2f6 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 23 Oct 2018 13:18:58 -0600 Subject: [PATCH] show error when status is error --- lib/admin/js/app.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/admin/js/app.js b/lib/admin/js/app.js index 9add25b..095c7c2 100644 --- a/lib/admin/js/app.js +++ b/lib/admin/js/app.js @@ -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; }); } };