From 8b6c97d5bc65bcea84f13a86d6384368ba7072c9 Mon Sep 17 00:00:00 2001 From: x Date: Tue, 29 Apr 2025 19:26:07 -0400 Subject: [PATCH] checkpoint frontend --- .../src/hooks/api/certificates/mutations.tsx | 1 + .../components/CertificateImportModal.tsx | 64 ++++++++++++++++++- 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/frontend/src/hooks/api/certificates/mutations.tsx b/frontend/src/hooks/api/certificates/mutations.tsx index f231b7963..88cdc3c38 100644 --- a/frontend/src/hooks/api/certificates/mutations.tsx +++ b/frontend/src/hooks/api/certificates/mutations.tsx @@ -56,6 +56,7 @@ export const useImportCertificate = () => { const queryClient = useQueryClient(); return useMutation({ mutationFn: async (body) => { + console.log("DBG-1"); const { data } = await apiRequest.post( "/api/v1/pki/certificates/import-certificate", body diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx index 6f988c17f..0c921f8fc 100644 --- a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx +++ b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx @@ -11,7 +11,8 @@ import { Modal, ModalContent, Select, - SelectItem + SelectItem, + TextArea } from "@app/components/v2"; import { useWorkspace } from "@app/context"; import { useImportCertificate, useGetCert, useListWorkspacePkiCollections } from "@app/hooks/api"; @@ -104,7 +105,6 @@ export const CertificateImportModal = ({ popUp, handlePopUpToggle }: Props) => { const { serialNumber, certificate, certificateChain, privateKey } = await importCertificate({ projectSlug: currentWorkspace.slug, - projectSlug: currentWorkspace.slug, certificatePem, privateKeyPem, @@ -153,9 +153,10 @@ export const CertificateImportModal = ({ popUp, handlePopUpToggle }: Props) => { name="collectionId" render={({ field: { onChange, ...field }, fieldState: { error } }) => (