Fix webserver help link in error page

This commit is contained in:
Johannes Zellner
2015-07-10 14:38:53 +02:00
parent c69ae602c2
commit bbff663d88
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
<center ng-show="errorCode == 0">
<h1> <i class="fa fa-frown-o fa-fw text-danger"></i> Something has gone wrong </h1>
Please check your cloudron status <a href="" ng-click="webServerOriginLink">here</a>.
Please check your cloudron status <a href="{{ webServerOriginLink }}">here</a>.
</center>
<center ng-show="errorCode == 1">
+2 -6
View File
@@ -4,13 +4,13 @@
var app = angular.module('Application', []);
app.controller('ErrorController', ['$scope', '$http', function ($scope, $http) {
$scope.webServerOriginLink = null;
$scope.webServerOriginLink = '/';
$scope.errorMessage = '';
// try to fetch at least config.json to get appstore url
$http.get('config.json').success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return console.error(status, data);
$scope.webServerOrigin = data.webServerOrigin + '/console.html';
$scope.webServerOriginLink = data.webServerOrigin + '/console.html';
}).error(function (data, status) {
if (status === 404) console.error('No config.json found');
else console.error(status, data);
@@ -20,8 +20,4 @@ app.controller('ErrorController', ['$scope', '$http', function ($scope, $http) {
$scope.errorCode = search.errorCode || 0;
$scope.errorContext = search.errorContext || '';
$scope.webServerOriginLink = function () {
window.location.href = $scope.webServerOrigin;
};
}]);