Sync the dns provider selection in the ui parts

This commit is contained in:
Johannes Zellner
2017-01-10 13:16:25 +01:00
parent 0a154339e6
commit dd764f1508
2 changed files with 12 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ app.controller('SetupDNSController', ['$scope', '$http', 'Client', function ($sc
$scope.error = null;
$scope.provider = '';
$scope.showDNSSetup = false;
// keep in sync with certs.js
$scope.dnsProvider = [
{ name: 'AWS Route53', value: 'route53' },
{ name: 'Digital Ocean', value: 'digitalocean' },

View File

@@ -6,11 +6,13 @@ angular.module('Application').controller('CertsController', ['$scope', '$locatio
$scope.config = Client.getConfig();
$scope.dnsConfig = null;
// keep in sync with setupdns.js
$scope.dnsProvider = [
{ name: 'Manual/Wildcard', value: 'manual' },
{ name: 'No-op', value: 'noop' },
{ name: 'AWS Route53', value: 'route53' },
{ name: 'Digital Ocean', value: 'digitalocean' }
{ name: 'Digital Ocean', value: 'digitalocean' },
{ name: 'Wildcard', value: 'wildcard' },
{ name: 'Manual (not recommended)', value: 'manual' },
{ name: 'No-op (only for development)', value: 'noop' }
];
$scope.defaultCert = {
@@ -119,6 +121,12 @@ angular.module('Application').controller('CertsController', ['$scope', '$locatio
token: $scope.dnsCredentials.digitalOceanToken
};
// special case the wildcard provider
if (data.provider === 'wildcard') {
data.provider = 'manual';
data.wildcard = true;
}
var func;
if (migrateDomain) {
data.domain = $scope.dnsCredentials.customDomain;