app.portBindings and newManifest.tcpPorts may be null
This commit is contained in:
75
webadmin/src/nakeddomain.html
Normal file
75
webadmin/src/nakeddomain.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="Application" ng-controller="Controller">
|
||||
<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" />
|
||||
|
||||
<title> Cloudron </title>
|
||||
|
||||
<!-- external fonts and CSS -->
|
||||
<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">
|
||||
|
||||
<!-- Theme CSS -->
|
||||
<link href="theme.css" 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', []);
|
||||
|
||||
// FIXME this does not work with custom domains!
|
||||
function detectApiOrigin() {
|
||||
var host = window.location.host;
|
||||
var tmp = host.split('.')[0];
|
||||
if (tmp.indexOf('-') === -1) return 'https://my-' + host;
|
||||
else return 'https://my' + tmp.slice(tmp.indexOf('-')) + host.slice(tmp.length);
|
||||
}
|
||||
|
||||
app.controller('Controller', ['$scope', '$http', function ($scope, $http) {
|
||||
$scope.apiOrigin = detectApiOrigin();
|
||||
$scope.cloudronName = 'Cloudron';
|
||||
|
||||
$http.get($scope.apiOrigin + '/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;
|
||||
}).error(function (data, status) {
|
||||
console.error(status, data);
|
||||
});
|
||||
}]);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="status-page">
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<img src="/img/logo_inverted_192.png"/>
|
||||
<h1> {{cloudronName}} </h1>
|
||||
<p>
|
||||
There is no app configured for this domain. If you want to put an app at this location,<br/>
|
||||
please reconfigure the app in the <a ng-href="{{apiOrigin}}">settings panel</a> and leave the location empty.
|
||||
</p>
|
||||
|
||||
<footer>
|
||||
<span class="text-muted"><a href="mailto: support@cloudron.io">Contact Support</a> - Copyright © Cloudron 2014-15</span>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user