feat(certificates): add force renew option for domain certificate reprovisioning

This commit is contained in:
2026-04-03 19:08:46 +00:00
parent 4a6913d4bb
commit 6112e4e884
9 changed files with 30 additions and 19 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/dcrouter',
version: '12.7.0',
version: '12.8.0',
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
}

View File

@@ -605,8 +605,8 @@ export const fetchCertificateOverviewAction = certificateStatePart.createAction(
}
});
export const reprovisionCertificateAction = certificateStatePart.createAction<string>(
async (statePartArg, domain, actionContext): Promise<ICertificateState> => {
export const reprovisionCertificateAction = certificateStatePart.createAction<{ domain: string; forceRenew?: boolean }>(
async (statePartArg, dataArg, actionContext): Promise<ICertificateState> => {
const context = getActionContext();
const currentState = statePartArg.getState()!;
@@ -617,7 +617,8 @@ export const reprovisionCertificateAction = certificateStatePart.createAction<st
await request.fire({
identity: context.identity!,
domain,
domain: dataArg.domain,
forceRenew: dataArg.forceRenew,
});
// Re-fetch overview after reprovisioning

View File

@@ -312,14 +312,16 @@ export class OpsViewCertificates extends DeesElement {
return;
}
const doReprovision = async () => {
const doReprovision = async (forceRenew = false) => {
await appstate.certificateStatePart.dispatchAction(
appstate.reprovisionCertificateAction,
cert.domain,
{ domain: cert.domain, forceRenew },
);
const { DeesToast } = await import('@design.estate/dees-catalog');
DeesToast.show({
message: `Reprovisioning triggered for ${cert.domain}`,
message: forceRenew
? `Force renewal triggered for ${cert.domain}`
: `Reprovisioning triggered for ${cert.domain}`,
type: 'success',
duration: 3000,
});
@@ -336,7 +338,7 @@ export class OpsViewCertificates extends DeesElement {
name: 'Force Renew',
action: async (modalArg: any) => {
await modalArg.destroy();
await doReprovision();
await doReprovision(true);
},
},
],