diff --git a/src/js/client.js b/src/js/client.js
index 8e40ceb45..33adde566 100644
--- a/src/js/client.js
+++ b/src/js/client.js
@@ -1380,6 +1380,13 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(callback); // this doesn't call defaultErrorHandler since we want to handle 404
};
+ Client.prototype.renewCerts = function (domain, callback) {
+ post('/api/v1/domains/' + domain + '/renew_certs', { }).success(function (data, status) {
+ if (status !== 202) return callback(new ClientError(status, data));
+ callback(null);
+ }).error(defaultErrorHandler(callback));
+ };
+
Client.prototype.removeDomain = function (domain, password, callback) {
var config = {
data: {
diff --git a/src/views/domains.html b/src/views/domains.html
index 32588ddc4..2c9da583a 100644
--- a/src/views/domains.html
+++ b/src/views/domains.html
@@ -198,6 +198,25 @@
+
+
@@ -261,6 +280,7 @@
+
|
diff --git a/src/views/domains.js b/src/views/domains.js
index b9ddfafc5..1ccdb25c1 100644
--- a/src/views/domains.js
+++ b/src/views/domains.js
@@ -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,