domainMigrate is unused
This commit is contained in:
@@ -164,8 +164,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
if ($scope.domainConfigure.provider === 'gcdns') {
|
||||
$scope.domainConfigure.gcdnsKey.keyFileName = domain.config.credentials && domain.config.credentials.client_email;
|
||||
$scope.domainConfigure.gcdnsKey.content = JSON.stringify({
|
||||
"project_id": domain.config.projectId,
|
||||
"credentials": domain.config.credentials
|
||||
project_id: domain.config.projectId,
|
||||
credentials: domain.config.credentials
|
||||
});
|
||||
}
|
||||
$scope.domainConfigure.digitalOceanToken = domain.provider === 'digitalocean' ? domain.config.token : '';
|
||||
@@ -316,56 +316,6 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
}
|
||||
};
|
||||
|
||||
$scope.domainMigrate = {
|
||||
busy: false,
|
||||
error: null,
|
||||
domain: null,
|
||||
password: null,
|
||||
|
||||
show: function (domain) {
|
||||
$scope.domainMigrate.reset();
|
||||
|
||||
$scope.domainMigrate.domain = domain;
|
||||
|
||||
$('#domainMigrateModal').modal('show');
|
||||
},
|
||||
|
||||
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;
|
||||
|
||||
Client.setAdmin($scope.domainMigrate.domain.domain, $scope.domainMigrate.password, function (error) {
|
||||
if (error && (error.statusCode === 403 || error.statusCode === 409)) {
|
||||
$scope.domainMigrate.password = '';
|
||||
$scope.domainMigrate.error = error.message;
|
||||
$scope.domainMigrateForm.password.$setPristine();
|
||||
$('#domainMigratePasswordInput').focus();
|
||||
} else if (error) {
|
||||
Client.error(error);
|
||||
} else {
|
||||
$('#domainMigrateModal').modal('hide');
|
||||
$scope.domainMigrate.reset();
|
||||
|
||||
window.location.href = setupDNSUrl;
|
||||
}
|
||||
|
||||
$scope.domainMigrate.busy = false;
|
||||
});
|
||||
},
|
||||
|
||||
reset: function () {
|
||||
$scope.domainMigrate.busy = false;
|
||||
$scope.domainMigrate.error = null;
|
||||
$scope.domainMigrate.domain = null;
|
||||
$scope.domainMigrate.password = '';
|
||||
|
||||
$scope.domainMigrateForm.$setPristine();
|
||||
$scope.domainMigrateForm.$setUntouched();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.renewCerts = {
|
||||
busy: false,
|
||||
percent: 0,
|
||||
@@ -609,7 +559,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
|
||||
|
||||
// setup all the dialog focus handling
|
||||
['domainConfigureModal', 'domainMigrateModal', 'domainRemoveModal'].forEach(function (id) {
|
||||
['domainConfigureModal', 'domainRemoveModal'].forEach(function (id) {
|
||||
$('#' + id).on('shown.bs.modal', function () {
|
||||
$(this).find("[autofocus]:first").focus();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user