Remove unused error.js the code is inline

This commit is contained in:
Johannes Zellner
2016-01-19 11:22:06 +01:00
parent c28f564a47
commit de80a6692d

View File

@@ -1,23 +0,0 @@
'use strict';
// create main application module
var app = angular.module('Application', []);
app.controller('ErrorController', ['$scope', '$http', function ($scope, $http) {
$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.webServerOriginLink = data.webServerOrigin + '/console.html';
}).error(function (data, status) {
if (status === 404) console.error('No config.json found');
else console.error(status, data);
});
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;
$scope.errorContext = search.errorContext || '';
}]);