From eb6a09c2bd53e92c624a8d083c7cc8eb76353798 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 19 Jan 2016 11:20:32 +0100 Subject: [PATCH] Try to fetch the cloudron status to offer a way to reload --- webadmin/src/error.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/webadmin/src/error.html b/webadmin/src/error.html index 67cc14c43..3b74d0a50 100644 --- a/webadmin/src/error.html +++ b/webadmin/src/error.html @@ -33,6 +33,7 @@ app.controller('Controller', ['$scope', '$http', function ($scope, $http) { $scope.webServerOriginLink = '/'; $scope.errorMessage = ''; + $scope.statusOk = false; // try to fetch at least config.json to get appstore url $http.get('/config.json').success(function(data, status) { @@ -43,6 +44,15 @@ else console.error(status, data); }); + // try to fetch the cloudron status + $http.get('/api/v1/cloudron/status').success(function(data, status) { + if (status !== 200 || typeof data !== 'object') return console.error(status, data); + $scope.statusOk = true; + }).error(function (data, status) { + console.error(status, data); + $scope.statusOk = false; + }); + var search = window.location.search.slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {}); $scope.errorCode = search.errorCode || 0; @@ -62,7 +72,8 @@

Something has gone wrong

- Please check your cloudron status here. + Please check your cloudron status here. + Please try again reloading the page here.