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

View File

@@ -39,8 +39,7 @@ export const CaPage = withProjectPermission(
"ca",
"deleteCa",
"installCaCert",
"renewCa",
"enrollmentOptions"
"renewCa"
] as const);
const onRemoveCaSubmit = async (caIdToDelete: string) => {

View File

@@ -14,7 +14,7 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
type Props = {
caId: string;
handlePopUpOpen: (
popUpName: keyof UsePopUpState<["ca", "renewCa", "installCaCert", "enrollmentOptions"]>,
popUpName: keyof UsePopUpState<["ca", "renewCa", "installCaCert"]>,
data?: {}
) => void;
};
@@ -118,34 +118,19 @@ export const CaDetailsSection = ({ caId, handlePopUpOpen }: Props) => {
>
{(isAllowed) => {
return (
<>
<Button
isDisabled={!isAllowed}
className="mt-4 w-full"
colorSchema="secondary"
type="submit"
onClick={() => {
handlePopUpOpen("enrollmentOptions", {
caId
});
}}
>
Enrollment Options
</Button>
<Button
isDisabled={!isAllowed}
className="mt-4 w-full"
colorSchema="primary"
type="submit"
onClick={() => {
handlePopUpOpen("renewCa", {
caId
});
}}
>
Renew CA
</Button>
</>
<Button
isDisabled={!isAllowed}
className="mt-4 w-full"
colorSchema="primary"
type="submit"
onClick={() => {
handlePopUpOpen("renewCa", {
caId
});
}}
>
Renew CA
</Button>
);
}}
</ProjectPermissionCan>