misc: removed enrollment options from CA page

This commit is contained in:
Sheen Capadngan
2024-08-22 15:40:36 +08:00
parent b7caff88cf
commit aa5b88ff04
2 changed files with 15 additions and 31 deletions
+1 -2
View File
@@ -39,8 +39,7 @@ export const CaPage = withProjectPermission(
"ca", "ca",
"deleteCa", "deleteCa",
"installCaCert", "installCaCert",
"renewCa", "renewCa"
"enrollmentOptions"
] as const); ] as const);
const onRemoveCaSubmit = async (caIdToDelete: string) => { const onRemoveCaSubmit = async (caIdToDelete: string) => {
@@ -14,7 +14,7 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
type Props = { type Props = {
caId: string; caId: string;
handlePopUpOpen: ( handlePopUpOpen: (
popUpName: keyof UsePopUpState<["ca", "renewCa", "installCaCert", "enrollmentOptions"]>, popUpName: keyof UsePopUpState<["ca", "renewCa", "installCaCert"]>,
data?: {} data?: {}
) => void; ) => void;
}; };
@@ -118,34 +118,19 @@ export const CaDetailsSection = ({ caId, handlePopUpOpen }: Props) => {
> >
{(isAllowed) => { {(isAllowed) => {
return ( return (
<> <Button
<Button isDisabled={!isAllowed}
isDisabled={!isAllowed} className="mt-4 w-full"
className="mt-4 w-full" colorSchema="primary"
colorSchema="secondary" type="submit"
type="submit" onClick={() => {
onClick={() => { handlePopUpOpen("renewCa", {
handlePopUpOpen("enrollmentOptions", { caId
caId });
}); }}
}} >
> Renew CA
Enrollment Options </Button>
</Button>
<Button
isDisabled={!isAllowed}
className="mt-4 w-full"
colorSchema="primary"
type="submit"
onClick={() => {
handlePopUpOpen("renewCa", {
caId
});
}}
>
Renew CA
</Button>
</>
); );
}} }}
</ProjectPermissionCan> </ProjectPermissionCan>