From e548a9d0feeae547dfc63816ee94f4f812d322e8 Mon Sep 17 00:00:00 2001 From: nfebe Date: Fri, 10 Apr 2026 09:41:12 +0100 Subject: [PATCH] feat(certificates): Add per-cert renewal and auto-renew controls Clicking a certificate now opens a details view showing its deployment link, with actions to renew it immediately or toggle auto-renewal. Each card exposes a quick renew shortcut, and deployments gain a Renew SSL action that renews all their certificates at once. --- src/services/api.ts | 15 +- src/views/CertificatesView.vue | 343 ++++++++++++++++++++++++++++- src/views/DeploymentDetailView.vue | 36 +++ 3 files changed, 384 insertions(+), 10 deletions(-) mode change 100644 => 100755 src/services/api.ts mode change 100644 => 100755 src/views/CertificatesView.vue mode change 100644 => 100755 src/views/DeploymentDetailView.vue diff --git a/src/services/api.ts b/src/services/api.ts old mode 100644 new mode 100755 index cfed1f1..3d6ee2d --- a/src/services/api.ts +++ b/src/services/api.ts @@ -157,12 +157,25 @@ export const networksApi = { export const certificatesApi = { list: () => apiClient.get<{ certificates: Certificate[] }>("/certificates"), + get: (domain: string) => apiClient.get<{ certificate: Certificate }>(`/certificates/${encodeURIComponent(domain)}`), request: (domain: string) => apiClient.post<{ message: string; result: any }>("/certificates", { domain, }), renew: () => apiClient.post<{ message: string; result: any }>("/certificates/renew"), - delete: (domain: string) => apiClient.delete(`/certificates/${domain}`), + renewOne: (domain: string) => + apiClient.post<{ message: string; domain: string; result: any }>( + `/certificates/${encodeURIComponent(domain)}/renew`, + ), + setAutoRenew: (domain: string, autoRenew: boolean) => + apiClient.patch<{ domain: string; auto_renew: boolean }>(`/certificates/${encodeURIComponent(domain)}/auto-renew`, { + auto_renew: autoRenew, + }), + renewDeployment: (name: string) => + apiClient.post<{ message: string; deployment: string; result: any }>( + `/deployments/${encodeURIComponent(name)}/certificates/renew`, + ), + delete: (domain: string) => apiClient.delete(`/certificates/${encodeURIComponent(domain)}`), }; export const proxyApi = { diff --git a/src/views/CertificatesView.vue b/src/views/CertificatesView.vue old mode 100644 new mode 100755 index f519888..1ec7962 --- a/src/views/CertificatesView.vue +++ b/src/views/CertificatesView.vue @@ -56,13 +56,22 @@