Do not use cloudron name in appstatus
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="Application" ng-controller="Controller">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
||||
@@ -13,41 +13,6 @@
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="//fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- jQuery-->
|
||||
<script src="3rdparty/js/jquery.min.js"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script src="3rdparty/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Angularjs scripts -->
|
||||
<script src="3rdparty/js/angular.min.js"></script>
|
||||
<script src="3rdparty/js/angular-loader.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
'use strict';
|
||||
|
||||
// create main application module
|
||||
var app = angular.module('Application', []);
|
||||
|
||||
app.controller('Controller', ['$scope', '$http', function ($scope, $http) {
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
$scope.cloudronName = 'Cloudron';
|
||||
$scope.referrer = search.referrer || null;
|
||||
|
||||
// try to fetch cloudron status
|
||||
$http.get('/api/v1/cloudron/status').success(function(data, status) {
|
||||
if (status !== 200 || typeof data !== 'object') return console.error(status, data);
|
||||
$scope.cloudronName = data.cloudronName;
|
||||
document.title = $scope.cloudronName + ' App Error';
|
||||
}).error(function (data, status) {
|
||||
console.error(status, data);
|
||||
});
|
||||
}]);
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="status-page">
|
||||
@@ -55,10 +20,9 @@
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<img src="/img/logo_inverted_192.png"/>
|
||||
<h1> {{cloudronName}} </h1>
|
||||
|
||||
<h3> <i class="fa fa-frown-o fa-fw text-danger"></i> Something has gone wrong </h3>
|
||||
This app is currently not running. <a href="{{ referrer }}">Please retry later</a>.
|
||||
This app is currently not running. <a id="appLink" href="">Please retry later</a>.
|
||||
|
||||
<footer>
|
||||
<span class="text-muted"><a href="mailto: support@cloudron.io">Contact Support</a> - Copyright © Cloudron 2014-15</span>
|
||||
@@ -66,5 +30,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
document.getElementById('appLink').href = search.referrer;
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user