Show cert template ID on manage policies modal

This commit is contained in:
Tuan Dang
2024-09-09 14:35:46 -07:00
parent 0b882ece8c
commit 87a9a87dcd
3 changed files with 10 additions and 3 deletions
@@ -204,6 +204,11 @@ export const CaModal = ({ popUp, handlePopUpToggle }: Props) => {
> >
<ModalContent title={`${ca ? "View" : "Create"} Private CA`}> <ModalContent title={`${ca ? "View" : "Create"} Private CA`}>
<form onSubmit={handleSubmit(onFormSubmit)}> <form onSubmit={handleSubmit(onFormSubmit)}>
{ca && (
<FormControl label="CA ID">
<Input value={ca.id} isDisabled className="bg-white/[0.07]" />
</FormControl>
)}
<Controller <Controller
control={control} control={control}
name="type" name="type"
@@ -218,7 +218,6 @@ export const CertificateModal = ({ popUp, handlePopUpToggle }: Props) => {
} }
errorText={error?.message} errorText={error?.message}
isError={Boolean(error)} isError={Boolean(error)}
className="mt-4"
isRequired isRequired
> >
<Select <Select
@@ -132,8 +132,6 @@ export const CertificateTemplateModal = ({ popUp, handlePopUpToggle, caId }: Pro
subjectAlternativeName, subjectAlternativeName,
ttl ttl
}); });
// TODO: requireTemplateForIssuance field
createNotification({ createNotification({
text: "Successfully updated certificate template", text: "Successfully updated certificate template",
@@ -177,6 +175,11 @@ export const CertificateTemplateModal = ({ popUp, handlePopUpToggle, caId }: Pro
> >
<ModalContent title={certTemplate ? "Certificate Template" : "Create Certificate Template"}> <ModalContent title={certTemplate ? "Certificate Template" : "Create Certificate Template"}>
<form onSubmit={handleSubmit(onFormSubmit)}> <form onSubmit={handleSubmit(onFormSubmit)}>
{certTemplate && (
<FormControl label="Certificate Template ID">
<Input value={certTemplate.id} isDisabled className="bg-white/[0.07]" />
</FormControl>
)}
<Controller <Controller
control={control} control={control}
defaultValue="" defaultValue=""