From 3ac3f44f1a9eb5a177a22dde09020585bbf338be Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Tue, 4 Nov 2025 13:26:10 -0800 Subject: [PATCH] Fix UI --- frontend/src/global.d.ts | 1 + .../CertificateProfilesTab.tsx | 18 ++++++++++-------- .../RevealAcmeEabSecretModal.tsx | 1 - 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/src/global.d.ts b/frontend/src/global.d.ts index 30b80cb70..a6de7ac8c 100644 --- a/frontend/src/global.d.ts +++ b/frontend/src/global.d.ts @@ -7,6 +7,7 @@ declare global { POSTHOG_API_KEY?: string; INTERCOM_ID?: string; TELEMETRY_CAPTURING_ENABLED: string; + ACME_FEATURE_ENABLED?: boolean; }; } } diff --git a/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CertificateProfilesTab.tsx b/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CertificateProfilesTab.tsx index 9ee238743..78517b49f 100644 --- a/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CertificateProfilesTab.tsx +++ b/frontend/src/pages/cert-manager/PoliciesPage/components/CertificateProfilesTab/CertificateProfilesTab.tsx @@ -113,14 +113,16 @@ export const CertificateProfilesTab = () => { mode="edit" /> - { - setIsRevealProfileAcmeEabSecretModalOpen(false); - setSelectedProfile(null); - }} - profile={selectedProfile} - /> + {selectedProfile.enrollmentType === "acme" && ( + { + setIsRevealProfileAcmeEabSecretModalOpen(false); + setSelectedProfile(null); + }} + profile={selectedProfile} + /> + )} const [isEabSecretCopied, setIsEabSecretCopied] = useToggle(false); const revealAcmeEabSecret = useRevealAcmeEabSecret({ profileId: profile.id }); const { data, isLoading, isError, error } = revealAcmeEabSecret; - const { directoryUrl } = profile.acmeConfig!; const { eabKid, eabSecret } = data ?? { eabKid: "", eabSecret: "" };