Remind the user to setup the DNS record on app configuration

This commit is contained in:
Johannes Zellner
2017-01-10 13:11:37 +01:00
parent 9b1b833fac
commit 2502b94f20
2 changed files with 18 additions and 0 deletions

View File

@@ -54,6 +54,11 @@
<br>
</p>
<p class="text-center" ng-show="appConfigure.location && dnsConfig.provider === 'manual' && !dnsConfig.wildcard">
<b>Do not forget, to add an A record for {{ appConfigure.location }}.{{ config.fqdn }}</b>
<br>
</p>
<div class="has-error text-center" ng-show="appConfigure.error.port">{{ appConfigure.error.port }}</div>
<div ng-repeat="(env, info) in appConfigure.portBindingsInfo">
<ng-form name="portInfo_form">

View File

@@ -7,6 +7,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.installedApps = Client.getInstalledApps();
$scope.config = Client.getConfig();
$scope.user = Client.getUserInfo();
$scope.dnsConfig = {};
$scope.groups = [];
$scope.users = [];
$scope.restartAppBusy = false;
@@ -542,6 +543,17 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
});
}
function fetchDnsConfig() {
Client.getDnsConfig(function (error, result) {
if (error) {
console.error(error);
return $timeout(fetchDnsConfig, 5000);
}
$scope.dnsConfig = result;
});
}
Client.onReady(function () {
Client.refreshUserInfo(function (error) {
if (error) return console.error(error);
@@ -549,6 +561,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
if ($scope.user.admin) {
fetchUsers();
fetchGroups();
fetchDnsConfig();
}
});
});