Add button to renew certs of a domain

This commit is contained in:
Girish Ramakrishnan
2018-10-24 15:24:23 -07:00
parent f68912b466
commit 15c0c691ff
3 changed files with 63 additions and 0 deletions
+36
View File
@@ -352,6 +352,42 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
}
};
$scope.domainRenewCerts = {
busy: false,
error: null,
domain: null,
show: function (domain) {
$scope.domainRenewCerts.reset();
$scope.domainRenewCerts.domain = domain;
$('#domainRenewCertsModal').modal('show');
},
submit: function () {
$scope.domainRenewCerts.busy = true;
$scope.domainRenewCerts.error = null;
Client.renewCerts($scope.domainRenewCerts.domain.domain, function (error) {
if (error) {
Client.error(error);
} else {
$('#domainRenewCertsModal').modal('hide');
$scope.domainRenewCerts.reset();
}
$scope.domainRenewCerts.busy = false;
});
},
reset: function () {
$scope.domainRenewCerts.busy = false;
$scope.domainRenewCerts.error = null;
$scope.domainRenewCerts.domain = null;
}
};
$scope.domainRemove = {
busy: false,
error: null,