Make the new domain available to setupdns view on migration

This commit is contained in:
Johannes Zellner
2018-01-11 16:30:03 +01:00
parent e96199927d
commit cbfd7cf1a6
2 changed files with 6 additions and 1 deletions

View File

@@ -24,6 +24,9 @@ app.controller('SetupDNSController', ['$scope', '$http', '$timeout', 'Client', f
$scope.isDomain = false;
$scope.isSubdomain = false;
// If we migrate the api origin we have to poll the new location
if (search.admin_fqdn) Client.apiOrigin = 'https://' + search.admin_fqdn;
$scope.$watch('dnsCredentials.domain', function (newVal) {
if (!newVal) {
$scope.isDomain = false;

View File

@@ -199,6 +199,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
},
submit: function () {
var setupDNSUrl = '/setupdns.html?admin_fqdn=my' + ($scope.domainMigrate.domain.provider === 'caas' ? '-' : '.') + $scope.domainMigrate.domain.domain;
$scope.domainMigrate.busy = true;
$scope.domainMigrate.error = null;
@@ -214,7 +216,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
$('#domainMigrateModal').modal('hide');
$scope.domainMigrate.reset();
window.location.href = '/setupdns.html';
window.location.href = setupDNSUrl;
}
$scope.domainMigrate.busy = false;