Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement(ui): migrate Certificate Manager pages to v3 headers (#8159)

Andrew Huang8fc3ce1497cf
diff --git a/frontend/src/components/v3/generic/Tabs/Tabs.tsx b/frontend/src/components/v3/generic/Tabs/Tabs.tsx
index f3ce64d896..69c6095c24 100644
--- a/frontend/src/components/v3/generic/Tabs/Tabs.tsx
+++ b/frontend/src/components/v3/generic/Tabs/Tabs.tsx
@@ -93,7 +93,7 @@ const TabsList = React.forwardRef<
data-scrollable-start={scrollEdges.start}
data-scrollable-end={scrollEdges.end}
className={cn(
- "scroll-edge-fade group/tabs-list no-scrollbar text-muted-foreground inline-flex w-fit max-w-full shrink-0 justify-center rounded-md data-[orientation=horizontal]:h-9 data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:overflow-y-hidden data-[orientation=horizontal]:overscroll-x-contain data-[orientation=vertical]:h-fit data-[orientation=vertical]:flex-col data-[style=filled]:items-center data-[style=underline]:w-full data-[style=underline]:items-stretch data-[style=underline]:rounded-none",
+ "scroll-edge-fade group/tabs-list no-scrollbar text-muted-foreground inline-flex w-fit max-w-full shrink-0 justify-center rounded-md data-[orientation=horizontal]:h-9 data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:overflow-y-hidden data-[orientation=horizontal]:overscroll-x-contain data-[orientation=vertical]:h-fit data-[orientation=vertical]:flex-col data-[style=filled]:items-center data-[style=underline]:items-stretch data-[style=underline]:rounded-none data-[orientation=horizontal]:data-[style=underline]:w-full",
tabsListVariants[tabsListStyleByVariant[variant]],
className
)}
diff --git a/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx b/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx
index ed5638f4cf..1502e42c0f 100644
--- a/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx
+++ b/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx
@@ -1,10 +1,16 @@
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
-import { DocumentationLinkBadge } from "@app/components/v3";
+import {
+ DocumentationLinkBadge,
+ PageHeader,
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger
+} from "@app/components/v3";
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
import { useListWorkspacePkiAlerts } from "@app/hooks/api";
import { ProjectType } from "@app/hooks/api/projects/types";
@@ -17,6 +23,19 @@ export const AlertingPage = () => {
const { t } = useTranslation();
const { currentProject } = useProject();
const [selectedTab, setSelectedTab] = useState("rule-based");
+ const [tabsOrientation, setTabsOrientation] = useState<"horizontal" | "vertical">(() =>
+ window.matchMedia("(min-width: 80rem)").matches ? "vertical" : "horizontal"
+ );
+
+ useEffect(() => {
+ const mediaQuery = window.matchMedia("(min-width: 80rem)");
+ const updateOrientation = () =>
+ setTabsOrientation(mediaQuery.matches ? "vertical" : "horizontal");
+
+ mediaQuery.addEventListener("change", updateOrientation);
+
+ return () => mediaQuery.removeEventListener("change", updateOrientation);
+ }, []);
const { data: v1AlertsData } = useListWorkspacePkiAlerts({
projectId: currentProject?.id || ""
@@ -29,7 +48,7 @@ export const AlertingPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Alerting" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title={
@@ -52,26 +71,22 @@ export const AlertingPage = () => {
<PkiAlertsV2Page hideContainer />
</div>
) : (
- <Tabs orientation="vertical" value={selectedTab} onValueChange={setSelectedTab}>
- <TabList>
- <Tab variant="project" value="rule-based">
- Certificate Alerts
- </Tab>
- <Tab variant="project" value="legacy">
- Collection Alerts (Legacy)
- </Tab>
- </TabList>
+ <Tabs orientation={tabsOrientation} value={selectedTab} onValueChange={setSelectedTab}>
+ <TabsList variant="project" aria-label="Alerting sections">
+ <TabsTrigger value="rule-based">Certificate Alerts</TabsTrigger>
+ <TabsTrigger value="legacy">Collection Alerts (Legacy)</TabsTrigger>
+ </TabsList>
- <TabPanel value="rule-based">
+ <TabsContent value="rule-based">
<PkiAlertsV2Page />
- </TabPanel>
+ </TabsContent>
- <TabPanel value="legacy">
+ <TabsContent value="legacy">
<div className="space-y-6">
<PkiAlertsSection />
<PkiCollectionSection />
</div>
- </TabPanel>
+ </TabsContent>
</Tabs>
)}
</ProjectPermissionCan>
diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx
index 253626f18b..85979da4bb 100644
--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/ApplicationDetailsByIDPage.tsx
@@ -12,7 +12,6 @@ import {
} from "lucide-react";
import { createNotification } from "@app/components/notifications";
-import { PageHeader } from "@app/components/v2";
import {
AccessRestrictedDialog,
Button,
@@ -22,6 +21,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
+ PageHeader,
PageLoader,
ResourceIcon,
Tabs,
@@ -192,18 +192,17 @@ export const ApplicationDetailsByIDPage = () => {
</Helmet>
<div className="h-full bg-bunker-800">
<div className="mx-auto flex flex-col text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <div className="mb-4">
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/applications"
- params={{ orgId: orgId ?? "", projectId: projectId ?? "" }}
- className="flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- Back to Applications
- </Link>
- </div>
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/applications"
+ params={{ orgId: orgId ?? "", projectId: projectId ?? "" }}
+ >
+ <ChevronLeftIcon size={16} />
+ Back to Applications
+ </Link>
+ }
scope={ProjectType.CertificateManager}
icon={ResourceIcon}
title={
@@ -217,7 +216,6 @@ export const ApplicationDetailsByIDPage = () => {
<span className="break-all">{application.description}</span>
) : undefined
}
- className="mb-4"
>
<DropdownMenu>
<DropdownMenuTrigger asChild>
diff --git a/frontend/src/pages/cert-manager/ApplicationsPage/ApplicationsPage.tsx b/frontend/src/pages/cert-manager/ApplicationsPage/ApplicationsPage.tsx
index 56d0aa2a94..6184183d78 100644
--- a/frontend/src/pages/cert-manager/ApplicationsPage/ApplicationsPage.tsx
+++ b/frontend/src/pages/cert-manager/ApplicationsPage/ApplicationsPage.tsx
@@ -3,7 +3,6 @@ import { Helmet } from "react-helmet";
import { useNavigate, useParams } from "@tanstack/react-router";
import { InfoIcon, MoreHorizontalIcon, PlusIcon, SlidersHorizontalIcon } from "lucide-react";
-import { PageHeader } from "@app/components/v2";
import {
Button,
Card,
@@ -22,6 +21,7 @@ import {
EmptyHeader,
EmptyTitle,
IconButton,
+ PageHeader,
PageLoader,
Pagination,
ResourceIcon,
@@ -180,7 +180,7 @@ export const ApplicationsPage = () => {
</Helmet>
<div className="h-full bg-bunker-800">
<div className="mx-auto flex flex-col text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
icon={ResourceIcon}
diff --git a/frontend/src/pages/cert-manager/ApprovalsPage/ApprovalsPage.tsx b/frontend/src/pages/cert-manager/ApprovalsPage/ApprovalsPage.tsx
index 96f6641386..dec6cc00ce 100644
--- a/frontend/src/pages/cert-manager/ApprovalsPage/ApprovalsPage.tsx
+++ b/frontend/src/pages/cert-manager/ApprovalsPage/ApprovalsPage.tsx
@@ -1,7 +1,7 @@
import { Helmet } from "react-helmet";
import { useSearch } from "@tanstack/react-router";
-import { PageHeader } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { useProject } from "@app/context";
import { PolicyTab } from "./components/PolicyTab";
@@ -20,7 +20,7 @@ export const ApprovalsPage = () => {
<Helmet>
<link rel="icon" href="/infisical.ico" />
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={currentProject.type}
title="Certificate Approvals"
diff --git a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx
index 910ffd8ab7..a0a994e32a 100644
--- a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx
@@ -7,13 +7,14 @@ import { EllipsisIcon } from "lucide-react";
import { createNotification } from "@app/components/notifications";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { DeleteActionModal, PageHeader } from "@app/components/v2";
+import { DeleteActionModal } from "@app/components/v2";
import {
Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
- DropdownMenuTrigger
+ DropdownMenuTrigger,
+ PageHeader
} from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import {
@@ -114,38 +115,38 @@ const Page = () => {
>
{(isAllowed) =>
isAllowed ? (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- {cameFromProfile && search.profileId ? (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-profiles/$profileId"
- params={{
- orgId: currentOrg.id,
- projectId,
- profileId: search.profileId
- }}
- search={{
- from: search.profileFrom,
- applicationName: search.profileApplicationName
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- {sourceProfile?.slug || "Certificate Profile"}
- </Link>
- ) : (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-authorities"
- params={{
- orgId: currentOrg.id,
- projectId
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- Certificate Authorities
- </Link>
- )}
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ cameFromProfile && search.profileId ? (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-profiles/$profileId"
+ params={{
+ orgId: currentOrg.id,
+ projectId,
+ profileId: search.profileId
+ }}
+ search={{
+ from: search.profileFrom,
+ applicationName: search.profileApplicationName
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ {sourceProfile?.slug || "Certificate Profile"}
+ </Link>
+ ) : (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-authorities"
+ params={{
+ orgId: currentOrg.id,
+ projectId
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificate Authorities
+ </Link>
+ )
+ }
scope={ProjectType.CertificateManager}
description="Manage certificate authority"
title={data.name}
diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx
index e10e3e31fc..59c696ffc7 100644
--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx
@@ -3,8 +3,7 @@ import { useTranslation } from "react-i18next";
import { useNavigate, useSearch } from "@tanstack/react-router";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader } from "@app/components/v2";
-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@app/components/v3";
+import { PageHeader, Tabs, TabsContent, TabsList, TabsTrigger } from "@app/components/v3";
import {
ProjectPermissionActions,
ProjectPermissionSub,
@@ -48,9 +47,8 @@ export const CertificateAuthoritiesPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Certificate Authorities" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
- className="mb-6"
scope={ProjectType.CertificateManager}
title="Certificate Authorities"
description="Define the trust anchors that sign your certificates: internal CAs you operate, plus external CAs you connect to."
diff --git a/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/CertificateDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/CertificateDetailsByIDPage.tsx
index 2c92774eb3..771697107e 100644
--- a/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/CertificateDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/CertificateDetailsByIDPage.tsx
@@ -5,7 +5,7 @@ import { ChevronLeftIcon, EllipsisIcon } from "lucide-react";
import { createNotification } from "@app/components/notifications";
import { getCertificateDisplayName } from "@app/components/utilities/certificateDisplayUtils";
-import { DeleteActionModal, EmptyState, PageHeader } from "@app/components/v2";
+import { DeleteActionModal, EmptyState } from "@app/components/v2";
import {
AccessRestrictedDialog,
Button,
@@ -13,6 +13,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
+ PageHeader,
PageLoader,
Tooltip,
TooltipContent,
@@ -262,6 +263,50 @@ const Page = () => {
)
);
+ let certificateBackLink = (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/inventory"
+ params={{
+ orgId: currentOrg.id,
+ projectId
+ }}
+ >
+ <ChevronLeftIcon size={16} />
+ Certificates
+ </Link>
+ );
+
+ if (parentApplication) {
+ certificateBackLink = (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/applications/$applicationName"
+ params={{
+ orgId: currentOrg.id,
+ projectId,
+ applicationName: parentApplication
+ }}
+ search={{ selectedTab: ApplicationTab.Certificates }}
+ >
+ <ChevronLeftIcon size={16} />
+ Go back to Application
+ </Link>
+ );
+ } else if (fromHsmConnector) {
+ certificateBackLink = (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/hsm-connectors/$connectorId"
+ params={{
+ orgId: currentOrg.id,
+ projectId,
+ connectorId: fromHsmConnector
+ }}
+ >
+ <ChevronLeftIcon size={16} />
+ HSM Connector
+ </Link>
+ );
+ }
+
let pageBody: React.ReactNode = null;
if (!certificate) {
pageBody = <EmptyState title="Error: Unable to find the certificate." className="py-12" />;
@@ -276,50 +321,9 @@ const Page = () => {
);
} else {
pageBody = (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- {parentApplication && (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/applications/$applicationName"
- params={{
- orgId: currentOrg.id,
- projectId,
- applicationName: parentApplication
- }}
- search={{ selectedTab: ApplicationTab.Certificates }}
- className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- Go back to Application
- </Link>
- )}
- {!parentApplication && fromHsmConnector && (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/hsm-connectors/$connectorId"
- params={{
- orgId: currentOrg.id,
- projectId,
- connectorId: fromHsmConnector
- }}
- className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- HSM Connector
- </Link>
- )}
- {!parentApplication && !fromHsmConnector && (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/inventory"
- params={{
- orgId: currentOrg.id,
- projectId
- }}
- className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- Certificates
- </Link>
- )}
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={certificateBackLink}
scope={ProjectType.CertificateManager}
description="View certificate details"
title={displayName}
diff --git a/frontend/src/pages/cert-manager/CertificatePoliciesPage/CertificatePoliciesPage.tsx b/frontend/src/pages/cert-manager/CertificatePoliciesPage/CertificatePoliciesPage.tsx
index b050722232..6da7ff7bde 100644
--- a/frontend/src/pages/cert-manager/CertificatePoliciesPage/CertificatePoliciesPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificatePoliciesPage/CertificatePoliciesPage.tsx
@@ -2,7 +2,7 @@ import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ProjectPermissionSub } from "@app/context";
import { ProjectPermissionCertificatePolicyActions } from "@app/context/ProjectPermissionContext/types";
import { ProjectType } from "@app/hooks/api/projects/types";
@@ -16,7 +16,7 @@ export const CertificatePoliciesPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Certificate Policies" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title="Certificate Policies"
diff --git a/frontend/src/pages/cert-manager/CertificatePolicyDetailsByIDPage/CertificatePolicyDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/CertificatePolicyDetailsByIDPage/CertificatePolicyDetailsByIDPage.tsx
index f92b206ba9..ddd5a81ecb 100644
--- a/frontend/src/pages/cert-manager/CertificatePolicyDetailsByIDPage/CertificatePolicyDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificatePolicyDetailsByIDPage/CertificatePolicyDetailsByIDPage.tsx
@@ -7,7 +7,8 @@ import { Link, useNavigate, useParams, useSearch } from "@tanstack/react-router"
import { createNotification } from "@app/components/notifications";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { DeleteActionModal, PageHeader } from "@app/components/v2";
+import { DeleteActionModal } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import { useOrganization, useProject } from "@app/context";
import {
@@ -113,38 +114,38 @@ const Page = () => {
>
{(isAllowed) =>
isAllowed ? (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- {cameFromProfile && search.profileId ? (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-profiles/$profileId"
- params={{
- orgId: currentOrg.id,
- projectId,
- profileId: search.profileId
- }}
- search={{
- from: search.profileFrom,
- applicationName: search.profileApplicationName
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- {sourceProfile?.slug || "Certificate Profile"}
- </Link>
- ) : (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-policies"
- params={{
- orgId: currentOrg.id,
- projectId
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- Certificate Policies
- </Link>
- )}
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ cameFromProfile && search.profileId ? (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-profiles/$profileId"
+ params={{
+ orgId: currentOrg.id,
+ projectId,
+ profileId: search.profileId
+ }}
+ search={{
+ from: search.profileFrom,
+ applicationName: search.profileApplicationName
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ {sourceProfile?.slug || "Certificate Profile"}
+ </Link>
+ ) : (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-policies"
+ params={{
+ orgId: currentOrg.id,
+ projectId
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificate Policies
+ </Link>
+ )
+ }
scope={ProjectType.CertificateManager}
description="Manage certificate policy"
title={policy.name}
diff --git a/frontend/src/pages/cert-manager/CertificateProfileDetailsByIDPage/CertificateProfileDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/CertificateProfileDetailsByIDPage/CertificateProfileDetailsByIDPage.tsx
index 284281908c..cd2211bcff 100644
--- a/frontend/src/pages/cert-manager/CertificateProfileDetailsByIDPage/CertificateProfileDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificateProfileDetailsByIDPage/CertificateProfileDetailsByIDPage.tsx
@@ -7,7 +7,8 @@ import { Link, useNavigate, useParams, useSearch } from "@tanstack/react-router"
import { createNotification } from "@app/components/notifications";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { DeleteActionModal, PageHeader } from "@app/components/v2";
+import { DeleteActionModal } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import { useOrganization, useProject } from "@app/context";
import {
@@ -98,34 +99,34 @@ const Page = () => {
>
{(isAllowed) =>
isAllowed ? (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- {cameFromApplication && search.applicationName ? (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/applications/$applicationName"
- params={{
- orgId: currentOrg.id,
- projectId,
- applicationName: search.applicationName
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- {search.applicationName}
- </Link>
- ) : (
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-profiles"
- params={{
- orgId: currentOrg.id,
- projectId
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- Certificate Profiles
- </Link>
- )}
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ cameFromApplication && search.applicationName ? (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/applications/$applicationName"
+ params={{
+ orgId: currentOrg.id,
+ projectId,
+ applicationName: search.applicationName
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ {search.applicationName}
+ </Link>
+ ) : (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/certificate-profiles"
+ params={{
+ orgId: currentOrg.id,
+ projectId
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificate Profiles
+ </Link>
+ )
+ }
scope={ProjectType.CertificateManager}
description="Manage certificate profile"
title={profile.slug}
diff --git a/frontend/src/pages/cert-manager/CertificateProfilesPage/CertificateProfilesPage.tsx b/frontend/src/pages/cert-manager/CertificateProfilesPage/CertificateProfilesPage.tsx
index d6cc829a87..2c9ba7bd26 100644
--- a/frontend/src/pages/cert-manager/CertificateProfilesPage/CertificateProfilesPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificateProfilesPage/CertificateProfilesPage.tsx
@@ -2,7 +2,7 @@ import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ProjectPermissionSub } from "@app/context";
import { ProjectPermissionCertificateProfileActions } from "@app/context/ProjectPermissionContext/types";
import { ProjectType } from "@app/hooks/api/projects/types";
@@ -16,7 +16,7 @@ export const CertificateProfilesPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Certificate Profiles" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title="Certificate Profiles"
diff --git a/frontend/src/pages/cert-manager/CodeSigningPage/CodeSigningPage.tsx b/frontend/src/pages/cert-manager/CodeSigningPage/CodeSigningPage.tsx
index 436cb1a666..584611d236 100644
--- a/frontend/src/pages/cert-manager/CodeSigningPage/CodeSigningPage.tsx
+++ b/frontend/src/pages/cert-manager/CodeSigningPage/CodeSigningPage.tsx
@@ -3,7 +3,7 @@ import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { PenTool } from "lucide-react";
-import { PageHeader } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { useProject } from "@app/context";
import { ProjectType } from "@app/hooks/api/projects/types";
@@ -20,7 +20,7 @@ export const CodeSigningPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Code Signing" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
icon={PenTool}
diff --git a/frontend/src/pages/cert-manager/DashboardPage/DashboardPage.tsx b/frontend/src/pages/cert-manager/DashboardPage/DashboardPage.tsx
index 55562851f0..da5a963402 100644
--- a/frontend/src/pages/cert-manager/DashboardPage/DashboardPage.tsx
+++ b/frontend/src/pages/cert-manager/DashboardPage/DashboardPage.tsx
@@ -4,8 +4,7 @@ import { useTranslation } from "react-i18next";
import { useNavigate } from "@tanstack/react-router";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader } from "@app/components/v2";
-import { PageLoader } from "@app/components/v3";
+import { PageHeader, PageLoader } from "@app/components/v3";
import { useProject } from "@app/context";
import {
ProjectPermissionCertificateActions,
@@ -64,9 +63,8 @@ export const DashboardPage = () => {
<title>{t("common.head-title", { title: "Certificate Dashboard" })}</title>
</Helmet>
<div className="mx-auto flex flex-col text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
- className="mb-6 md:mb-10"
scope={ProjectType.CertificateManager}
title="Certificate Dashboard"
description="See the overall state of your certificates at a glance."
diff --git a/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/DiscoveryDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/DiscoveryDetailsByIDPage.tsx
index b3ea365cf2..7db042b2f8 100644
--- a/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/DiscoveryDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/DiscoveryDetailsByIDPage.tsx
@@ -5,7 +5,7 @@ import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { ChevronLeftIcon, EllipsisIcon } from "lucide-react";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { DeleteActionModal, PageHeader } from "@app/components/v2";
+import { DeleteActionModal } from "@app/components/v2";
import {
Badge,
Button,
@@ -13,6 +13,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
+ PageHeader,
PageLoader
} from "@app/components/v3";
import {
@@ -104,16 +105,17 @@ const Page = () => {
return (
<div className="mx-auto flex flex-col justify-between text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/discovery"
- params={{ orgId: currentOrg.id, projectId: currentProject.id }}
- className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- Jobs
- </Link>
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/discovery"
+ params={{ orgId: currentOrg.id, projectId: currentProject.id }}
+ >
+ <ChevronLeftIcon size={16} />
+ Jobs
+ </Link>
+ }
scope={ProjectType.CertificateManager}
description="Certificate Discovery Job"
title={
diff --git a/frontend/src/pages/cert-manager/DiscoveryPage/DiscoveryPage.tsx b/frontend/src/pages/cert-manager/DiscoveryPage/DiscoveryPage.tsx
index da34f41a16..a3d5bd1466 100644
--- a/frontend/src/pages/cert-manager/DiscoveryPage/DiscoveryPage.tsx
+++ b/frontend/src/pages/cert-manager/DiscoveryPage/DiscoveryPage.tsx
@@ -3,8 +3,14 @@ import { useTranslation } from "react-i18next";
import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
-import { DocumentationLinkBadge } from "@app/components/v3";
+import {
+ DocumentationLinkBadge,
+ PageHeader,
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger
+} from "@app/components/v3";
import {
ProjectPermissionPkiCertificateInstallationActions,
ProjectPermissionPkiDiscoveryActions,
@@ -41,9 +47,8 @@ export const DiscoveryPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Certificate Discovery" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
- className="mb-6"
scope={ProjectType.CertificateManager}
title={
<span className="inline-flex items-center gap-x-2">
@@ -57,15 +62,11 @@ export const DiscoveryPage = () => {
/>
<CertManagerAdminOnly>
<Tabs value={activeTab} onValueChange={onTabChange}>
- <TabList>
- <Tab variant="project" value="jobs">
- Jobs
- </Tab>
- <Tab variant="project" value="installations">
- Installations
- </Tab>
- </TabList>
- <TabPanel value="jobs">
+ <TabsList variant="project" aria-label="Certificate discovery sections">
+ <TabsTrigger value="jobs">Jobs</TabsTrigger>
+ <TabsTrigger value="installations">Installations</TabsTrigger>
+ </TabsList>
+ <TabsContent value="jobs">
<ProjectPermissionCan
renderGuardBanner
I={ProjectPermissionPkiDiscoveryActions.Read}
@@ -73,8 +74,8 @@ export const DiscoveryPage = () => {
>
<DiscoveryJobsTab projectId={currentProject?.id || ""} />
</ProjectPermissionCan>
- </TabPanel>
- <TabPanel value="installations">
+ </TabsContent>
+ <TabsContent value="installations">
<ProjectPermissionCan
renderGuardBanner
I={ProjectPermissionPkiCertificateInstallationActions.Read}
@@ -82,7 +83,7 @@ export const DiscoveryPage = () => {
>
<InstallationsTab projectId={currentProject?.id || ""} />
</ProjectPermissionCan>
- </TabPanel>
+ </TabsContent>
</Tabs>
</CertManagerAdminOnly>
</div>
diff --git a/frontend/src/pages/cert-manager/HsmConnectorDetailsByIDPage/HsmConnectorDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/HsmConnectorDetailsByIDPage/HsmConnectorDetailsByIDPage.tsx
index 53b43fcbff..c20f6a6923 100644
--- a/frontend/src/pages/cert-manager/HsmConnectorDetailsByIDPage/HsmConnectorDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/HsmConnectorDetailsByIDPage/HsmConnectorDetailsByIDPage.tsx
@@ -5,7 +5,7 @@ import { ChevronLeftIcon } from "lucide-react";
import { createNotification } from "@app/components/notifications";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import { useOrganization, useProject } from "@app/context";
import {
@@ -80,17 +80,18 @@ const Page = () => {
>
{(isAllowed) =>
isAllowed ? (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/settings"
- params={{ orgId: currentOrg.id, projectId }}
- search={{ selectedTab: "hsm-connectors" }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <ChevronLeftIcon className="size-4" />
- HSM Connectors
- </Link>
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/settings"
+ params={{ orgId: currentOrg.id, projectId }}
+ search={{ selectedTab: "hsm-connectors" }}
+ >
+ <ChevronLeftIcon className="size-4" />
+ HSM Connectors
+ </Link>
+ }
scope={ProjectType.CertificateManager}
description={connector.description || "Hardware security module connector"}
title={connector.name}
diff --git a/frontend/src/pages/cert-manager/InstallationDetailsByIDPage/InstallationDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/InstallationDetailsByIDPage/InstallationDetailsByIDPage.tsx
index 92bc194637..4c6e54a759 100644
--- a/frontend/src/pages/cert-manager/InstallationDetailsByIDPage/InstallationDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/InstallationDetailsByIDPage/InstallationDetailsByIDPage.tsx
@@ -3,13 +3,14 @@ import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { ChevronLeftIcon, EllipsisIcon } from "lucide-react";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { DeleteActionModal, PageHeader } from "@app/components/v2";
+import { DeleteActionModal } from "@app/components/v2";
import {
Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
+ PageHeader,
PageLoader
} from "@app/components/v3";
import {
@@ -73,17 +74,18 @@ const Page = () => {
return (
<div className="mx-auto flex flex-col justify-between text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/discovery"
- params={{ orgId: currentOrg.id, projectId: currentProject.id }}
- search={{ selectedTab: "installations" }}
- className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- Installations
- </Link>
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/discovery"
+ params={{ orgId: currentOrg.id, projectId: currentProject.id }}
+ search={{ selectedTab: "installations" }}
+ >
+ <ChevronLeftIcon size={16} />
+ Installations
+ </Link>
+ }
scope={ProjectType.CertificateManager}
description="Certificate Installation Details"
title={displayName}
diff --git a/frontend/src/pages/cert-manager/InventoryPage/InventoryPage.tsx b/frontend/src/pages/cert-manager/InventoryPage/InventoryPage.tsx
index 056bb63575..c4207c04f6 100644
--- a/frontend/src/pages/cert-manager/InventoryPage/InventoryPage.tsx
+++ b/frontend/src/pages/cert-manager/InventoryPage/InventoryPage.tsx
@@ -3,8 +3,7 @@ import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { useSearch } from "@tanstack/react-router";
-import { PageHeader } from "@app/components/v2";
-import { AccessRestrictedDialog, PageLoader } from "@app/components/v3";
+import { AccessRestrictedDialog, PageHeader, PageLoader } from "@app/components/v3";
import { useProject, useProjectPermission } from "@app/context";
import {
ProjectPermissionCertificateActions,
@@ -97,7 +96,7 @@ export const InventoryPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Inventory" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title="Inventory"
diff --git a/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx
index 8822c74194..ad8356570f 100644
--- a/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx
@@ -14,9 +14,9 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
- PageHeader,
Tooltip
} from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import {
ProjectPermissionActions,
@@ -74,19 +74,20 @@ export const PkiCollectionPage = () => {
return (
<div className="mx-auto flex flex-col justify-between text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/policies"
- params={{
- orgId: currentOrg.id,
- projectId: params.projectId
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- Certificates
- </Link>
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/policies"
+ params={{
+ orgId: currentOrg.id,
+ projectId: params.projectId
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificates
+ </Link>
+ }
scope={ProjectType.CertificateManager}
title={data.name}
description="Manage certificate collection"
diff --git a/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx
index 58862ef67b..062b7c374d 100644
--- a/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx
@@ -14,9 +14,9 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
- PageHeader,
Tooltip
} from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import {
ProjectPermissionPkiSubscriberActions,
@@ -74,19 +74,20 @@ const Page = () => {
return (
<div className="mx-auto flex flex-col justify-between text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <Link
- to="/organizations/$orgId/projects/cert-manager/$projectId/subscribers"
- params={{
- orgId: currentOrg.id,
- projectId
- }}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
- >
- <FontAwesomeIcon icon={faChevronLeft} />
- Subscribers
- </Link>
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/subscribers"
+ params={{
+ orgId: currentOrg.id,
+ projectId
+ }}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Subscribers
+ </Link>
+ }
scope={ProjectType.CertificateManager}
title={data.name}
description="Manage PKI subscriber"
diff --git a/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx b/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx
index f38839be9e..5abab8bc06 100644
--- a/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx
@@ -1,7 +1,7 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { PageHeader } from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import { ProjectType } from "@app/hooks/api/projects/types";
import { PkiSubscriberSection } from "./components";
@@ -15,7 +15,7 @@ export const PkiSubscribersPage = () => {
</Helmet>
<div className="h-full bg-bunker-800">
<div className="mx-auto flex flex-col justify-between text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title="Subscribers"
diff --git a/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx b/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx
index fd9311ad19..9a598653cc 100644
--- a/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx
@@ -27,7 +27,6 @@ import {
EmptyState,
Modal,
ModalContent,
- PageHeader,
Pagination,
Table,
TableContainer,
@@ -40,6 +39,7 @@ import {
Tooltip,
Tr
} from "@app/components/v2";
+import { PageHeader } from "@app/components/v3";
import {
ProjectPermissionCertificateActions,
ProjectPermissionPkiTemplateActions,
@@ -98,192 +98,194 @@ export const PkiTemplateListPage = () => {
</Helmet>
<div className="h-full bg-bunker-800">
<div className="mx-auto flex flex-col justify-between text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title="Certificate Templates"
description="Manage certificate template to request and issue dynamic certificates following a strict format."
/>
- </div>
- <div className="container mx-auto mb-6 max-w-8xl rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- {/* TODO: Use subscription.pkiLegacyTemplates to block legacy templates creation */}
- <div className="mb-4 flex justify-between">
- <p className="text-xl font-medium text-mineshaft-100">Templates</p>
- <div className="flex w-full justify-end">
- <ProjectPermissionCan
- I={ProjectPermissionPkiTemplateActions.Create}
- a={ProjectPermissionSub.CertificateTemplates}
- >
- {(isAllowed) => (
- <Button
- colorSchema="primary"
- type="submit"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- onClick={() => handlePopUpOpen("certificateTemplate")}
- isDisabled={!isAllowed}
- className="ml-4"
- >
- Add Template
- </Button>
- )}
- </ProjectPermissionCan>
+ <div className="container mx-auto mb-6 max-w-8xl rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ {/* TODO: Use subscription.pkiLegacyTemplates to block legacy templates creation */}
+ <div className="mb-4 flex justify-between">
+ <p className="text-xl font-medium text-mineshaft-100">Templates</p>
+ <div className="flex w-full justify-end">
+ <ProjectPermissionCan
+ I={ProjectPermissionPkiTemplateActions.Create}
+ a={ProjectPermissionSub.CertificateTemplates}
+ >
+ {(isAllowed) => (
+ <Button
+ colorSchema="primary"
+ type="submit"
+ leftIcon={<FontAwesomeIcon icon={faPlus} />}
+ onClick={() => handlePopUpOpen("certificateTemplate")}
+ isDisabled={!isAllowed}
+ className="ml-4"
+ >
+ Add Template
+ </Button>
+ )}
+ </ProjectPermissionCan>
+ </div>
</div>
- </div>
- <TableContainer>
- <Table>
- <THead>
- <Tr>
- <Th>Name</Th>
- <Th>Issuing CA</Th>
- <Th className="w-64">Last Updated At</Th>
- <Th />
- </Tr>
- </THead>
- <TBody>
- {isPending && <TableSkeleton columns={4} innerKey="project-cert-templates" />}
- {!isPending &&
- data?.certificateTemplates?.map((template) => {
- return (
- <Tr className="h-10" key={`certificate-template-${template.id}`}>
- <Td>{template.name}</Td>
- <Td>
- <Tag size="xs">{template.ca.name}</Tag>
- </Td>
- <Td>{format(new Date(template.updatedAt), "yyyy-MM-dd | HH:mm:ss")}</Td>
- <Td className="text-right align-middle">
- <DropdownMenu>
- <DropdownMenuTrigger asChild className="rounded-lg">
- <div className="hover:text-primary-400 data-[state=open]:text-primary-400">
- <Tooltip content="More options">
- <FontAwesomeIcon size="lg" icon={faEllipsis} />
- </Tooltip>
- </div>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="start" className="p-1">
- <ProjectPermissionCan
- I={ProjectPermissionCertificateActions.Create}
- a={ProjectPermissionSub.Certificates}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- !isAllowed &&
- "pointer-events-none cursor-not-allowed opacity-50"
- )}
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("certificateFromTemplate", template);
- }}
- disabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faFileContract} />}
- >
- Issue Certificate
- </DropdownMenuItem>
- )}
- </ProjectPermissionCan>
- <ProjectPermissionCan
- I={ProjectPermissionPkiTemplateActions.Edit}
- a={ProjectPermissionSub.CertificateTemplates}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- !isAllowed &&
- "pointer-events-none cursor-not-allowed opacity-50"
- )}
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("certificateTemplate", template);
- }}
- disabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faPencil} />}
- >
- Edit Template
- </DropdownMenuItem>
- )}
- </ProjectPermissionCan>
- <ProjectPermissionCan
- I={ProjectPermissionPkiTemplateActions.Edit}
- a={ProjectPermissionSub.CertificateTemplates}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- !isAllowed &&
- "pointer-events-none cursor-not-allowed opacity-50"
- )}
- onClick={(e) => {
- e.stopPropagation();
- if (!subscription.pkiEst) {
- handlePopUpOpen("estUpgradePlan", {
- isEnterpriseFeature: true
- });
- return;
- }
- handlePopUpOpen("enrollmentOptions", {
- id: template.id
- });
- }}
- disabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faCog} />}
- >
- Manage Enrollment
- </DropdownMenuItem>
- )}
- </ProjectPermissionCan>
- <ProjectPermissionCan
- I={ProjectPermissionPkiTemplateActions.Delete}
- a={ProjectPermissionSub.CertificateTemplates}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- !isAllowed &&
- "pointer-events-none cursor-not-allowed opacity-50"
- )}
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("deleteTemplate", template);
- }}
- disabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faTrash} />}
- >
- Delete Template
- </DropdownMenuItem>
- )}
- </ProjectPermissionCan>
- </DropdownMenuContent>
- </DropdownMenu>
- </Td>
- </Tr>
- );
- })}
- {!isPending && !data?.certificateTemplates?.length && (
+ <TableContainer>
+ <Table>
+ <THead>
<Tr>
- <Td colSpan={4}>
- <EmptyState title="No certificate templates found" icon={faCertificate} />
- </Td>
+ <Th>Name</Th>
+ <Th>Issuing CA</Th>
+ <Th className="w-64">Last Updated At</Th>
+ <Th />
</Tr>
+ </THead>
+ <TBody>
+ {isPending && <TableSkeleton columns={4} innerKey="project-cert-templates" />}
+ {!isPending &&
+ data?.certificateTemplates?.map((template) => {
+ return (
+ <Tr className="h-10" key={`certificate-template-${template.id}`}>
+ <Td>{template.name}</Td>
+ <Td>
+ <Tag size="xs">{template.ca.name}</Tag>
+ </Td>
+ <Td>{format(new Date(template.updatedAt), "yyyy-MM-dd | HH:mm:ss")}</Td>
+ <Td className="text-right align-middle">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild className="rounded-lg">
+ <div className="hover:text-primary-400 data-[state=open]:text-primary-400">
+ <Tooltip content="More options">
+ <FontAwesomeIcon size="lg" icon={faEllipsis} />
+ </Tooltip>
+ </div>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="start" className="p-1">
+ <ProjectPermissionCan
+ I={ProjectPermissionCertificateActions.Create}
+ a={ProjectPermissionSub.Certificates}
+ >
+ {(isAllowed) => (
+ <DropdownMenuItem
+ className={twMerge(
+ !isAllowed &&
+ "pointer-events-none cursor-not-allowed opacity-50"
+ )}
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("certificateFromTemplate", template);
+ }}
+ disabled={!isAllowed}
+ icon={<FontAwesomeIcon icon={faFileContract} />}
+ >
+ Issue Certificate
+ </DropdownMenuItem>
+ )}
+ </ProjectPermissionCan>
+ <ProjectPermissionCan
+ I={ProjectPermissionPkiTemplateActions.Edit}
+ a={ProjectPermissionSub.CertificateTemplates}
+ >
+ {(isAllowed) => (
+ <DropdownMenuItem
+ className={twMerge(
+ !isAllowed &&
+ "pointer-events-none cursor-not-allowed opacity-50"
+ )}
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("certificateTemplate", template);
+ }}
+ disabled={!isAllowed}
+ icon={<FontAwesomeIcon icon={faPencil} />}
+ >
+ Edit Template
+ </DropdownMenuItem>
+ )}
+ </ProjectPermissionCan>
+ <ProjectPermissionCan
+ I={ProjectPermissionPkiTemplateActions.Edit}
+ a={ProjectPermissionSub.CertificateTemplates}
+ >
+ {(isAllowed) => (
+ <DropdownMenuItem
+ className={twMerge(
+ !isAllowed &&
+ "pointer-events-none cursor-not-allowed opacity-50"
+ )}
+ onClick={(e) => {
+ e.stopPropagation();
+ if (!subscription.pkiEst) {
+ handlePopUpOpen("estUpgradePlan", {
+ isEnterpriseFeature: true
+ });
+ return;
+ }
+ handlePopUpOpen("enrollmentOptions", {
+ id: template.id
+ });
+ }}
+ disabled={!isAllowed}
+ icon={<FontAwesomeIcon icon={faCog} />}
+ >
+ Manage Enrollment
+ </DropdownMenuItem>
+ )}
+ </ProjectPermissionCan>
+ <ProjectPermissionCan
+ I={ProjectPermissionPkiTemplateActions.Delete}
+ a={ProjectPermissionSub.CertificateTemplates}
+ >
+ {(isAllowed) => (
+ <DropdownMenuItem
+ className={twMerge(
+ !isAllowed &&
+ "pointer-events-none cursor-not-allowed opacity-50"
+ )}
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("deleteTemplate", template);
+ }}
+ disabled={!isAllowed}
+ icon={<FontAwesomeIcon icon={faTrash} />}
+ >
+ Delete Template
+ </DropdownMenuItem>
+ )}
+ </ProjectPermissionCan>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </Td>
+ </Tr>
+ );
+ })}
+ {!isPending && !data?.certificateTemplates?.length && (
+ <Tr>
+ <Td colSpan={4}>
+ <EmptyState title="No certificate templates found" icon={faCertificate} />
+ </Td>
+ </Tr>
+ )}
+ </TBody>
+ </Table>
+ {!isPending &&
+ data?.totalCount !== undefined &&
+ data.totalCount >= PER_PAGE_INIT && (
+ <Pagination
+ count={data.totalCount}
+ page={page}
+ perPage={perPage}
+ onChangePage={(newPage) => setPage(newPage)}
+ onChangePerPage={(newPerPage) => setPerPage(newPerPage)}
+ />
)}
- </TBody>
- </Table>
- {!isPending && data?.totalCount !== undefined && data.totalCount >= PER_PAGE_INIT && (
- <Pagination
- count={data.totalCount}
- page={page}
- perPage={perPage}
- onChangePage={(newPage) => setPage(newPage)}
- onChangePerPage={(newPerPage) => setPerPage(newPerPage)}
- />
- )}
- </TableContainer>
- <DeleteActionModal
- isOpen={popUp.deleteTemplate.isOpen}
- title="Are you sure you want to remove the PKI Template?"
- onChange={(isOpen) => handlePopUpToggle("deleteTemplate", isOpen)}
- deleteKey="confirm"
- onDeleteApproved={() => onRemovePkiSubscriberSubmit()}
- />
+ </TableContainer>
+ <DeleteActionModal
+ isOpen={popUp.deleteTemplate.isOpen}
+ title="Are you sure you want to remove the PKI Template?"
+ onChange={(isOpen) => handlePopUpToggle("deleteTemplate", isOpen)}
+ deleteKey="confirm"
+ onDeleteApproved={() => onRemovePkiSubscriberSubmit()}
+ />
+ </div>
</div>
<div className="container mx-auto max-w-8xl" />
</div>
diff --git a/frontend/src/pages/cert-manager/PoliciesPage/PoliciesPage.tsx b/frontend/src/pages/cert-manager/PoliciesPage/PoliciesPage.tsx
index 5654af3fa8..1dc213ab05 100644
--- a/frontend/src/pages/cert-manager/PoliciesPage/PoliciesPage.tsx
+++ b/frontend/src/pages/cert-manager/PoliciesPage/PoliciesPage.tsx
@@ -3,8 +3,7 @@ import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { useNavigate, useSearch } from "@tanstack/react-router";
-import { PageHeader } from "@app/components/v2";
-import { AccessRestrictedDialog, PageLoader } from "@app/components/v3";
+import { AccessRestrictedDialog, PageHeader, PageLoader } from "@app/components/v3";
import { useProject, useProjectPermission } from "@app/context";
import {
ProjectPermissionCertificateActions,
@@ -136,7 +135,7 @@ export const PoliciesPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Certificate Manager" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
scope={ProjectType.CertificateManager}
title="Certificate Manager"
diff --git a/frontend/src/pages/cert-manager/RequestsPage/RequestsPage.tsx b/frontend/src/pages/cert-manager/RequestsPage/RequestsPage.tsx
index ad16e0560b..af6ee4eef5 100644
--- a/frontend/src/pages/cert-manager/RequestsPage/RequestsPage.tsx
+++ b/frontend/src/pages/cert-manager/RequestsPage/RequestsPage.tsx
@@ -4,7 +4,6 @@ import { useQuery } from "@tanstack/react-query";
import { Link, useNavigate, useParams, useSearch } from "@tanstack/react-router";
import { FilterIcon, SearchIcon } from "lucide-react";
-import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
import {
Badge,
Card,
@@ -25,12 +24,17 @@ import {
InputGroup,
InputGroupAddon,
InputGroupInput,
+ PageHeader,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
- TableRow
+ TableRow,
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger
} from "@app/components/v3";
import { useDebounce } from "@app/hooks";
import { ApprovalPolicyScope, ApprovalPolicyType } from "@app/hooks/api/approvalPolicies";
@@ -243,9 +247,8 @@ export const RequestsPage = () => {
</Helmet>
<div className="h-full bg-bunker-800">
<div className="mx-auto flex flex-col text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
- className="mb-6"
scope={ProjectType.CertificateManager}
title="Approval Requests"
description="Review pending approval requests across your applications and signers"
@@ -261,26 +264,26 @@ export const RequestsPage = () => {
})
}
>
- <TabList>
- <Tab variant="project" value="application-requests" className="gap-2">
+ <TabsList variant="project" aria-label="Approval request sections">
+ <TabsTrigger value="application-requests" className="gap-2">
Application Requests
{Boolean(pendingApplicationCount) && (
<Badge variant="warning" isSquare>
{pendingApplicationCount}
</Badge>
)}
- </Tab>
- <Tab variant="project" value="signing-requests" className="gap-2">
+ </TabsTrigger>
+ <TabsTrigger value="signing-requests" className="gap-2">
Signing Requests
{Boolean(pendingSigningCount) && (
<Badge variant="warning" isSquare>
{pendingSigningCount}
</Badge>
)}
- </Tab>
- </TabList>
+ </TabsTrigger>
+ </TabsList>
- <TabPanel value="application-requests">
+ <TabsContent value="application-requests">
<Card>
<CardHeader>
<CardTitle>Application Requests</CardTitle>
@@ -436,9 +439,9 @@ export const RequestsPage = () => {
)}
</CardContent>
</Card>
- </TabPanel>
+ </TabsContent>
- <TabPanel value="signing-requests">
+ <TabsContent value="signing-requests">
<Card>
<CardHeader>
<CardTitle>Signing Requests</CardTitle>
@@ -562,7 +565,7 @@ export const RequestsPage = () => {
)}
</CardContent>
</Card>
- </TabPanel>
+ </TabsContent>
</Tabs>
</div>
</div>
diff --git a/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx b/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx
index d4b822f14c..48e5ee0645 100644
--- a/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx
@@ -2,7 +2,7 @@ import { Helmet } from "react-helmet";
import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
+import { PageHeader, Tabs, TabsContent, TabsList, TabsTrigger } from "@app/components/v3";
import { ProjectPermissionSub } from "@app/context";
import {
ProjectPermissionAppConnectionActions,
@@ -25,9 +25,8 @@ export const SettingsPage = () => {
<Helmet>
<title>Settings</title>
</Helmet>
- <div className="w-full max-w-8xl">
+ <div className="flex w-full max-w-8xl flex-col gap-8">
<PageHeader
- className="mb-6"
scope={ProjectType.CertificateManager}
title="Settings"
description="Configure app connections, HSM connectors, and cleanup rules."
@@ -43,19 +42,13 @@ export const SettingsPage = () => {
})
}
>
- <TabList>
- <Tab variant="project" value="app-connections">
- App Connections
- </Tab>
- <Tab variant="project" value="hsm-connectors">
- HSM Connectors
- </Tab>
- <Tab variant="project" value="cleanup">
- Cleanup
- </Tab>
- </TabList>
+ <TabsList variant="project" aria-label="Certificate Manager settings sections">
+ <TabsTrigger value="app-connections">App Connections</TabsTrigger>
+ <TabsTrigger value="hsm-connectors">HSM Connectors</TabsTrigger>
+ <TabsTrigger value="cleanup">Cleanup</TabsTrigger>
+ </TabsList>
- <TabPanel value="app-connections">
+ <TabsContent value="app-connections">
<ProjectPermissionCan
renderGuardBanner
I={ProjectPermissionAppConnectionActions.Read}
@@ -63,9 +56,9 @@ export const SettingsPage = () => {
>
<AppConnectionsTab />
</ProjectPermissionCan>
- </TabPanel>
+ </TabsContent>
- <TabPanel value="hsm-connectors">
+ <TabsContent value="hsm-connectors">
<ProjectPermissionCan
renderGuardBanner
I={ProjectPermissionHsmConnectorActions.Read}
@@ -73,11 +66,11 @@ export const SettingsPage = () => {
>
<HsmConnectorsTab />
</ProjectPermissionCan>
- </TabPanel>
+ </TabsContent>
- <TabPanel value="cleanup">
+ <TabsContent value="cleanup">
<CertificateCleanupTab />
- </TabPanel>
+ </TabsContent>
</Tabs>
</div>
</div>
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/SignerDetailPage.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/SignerDetailPage.tsx
index f2892a6d40..7036e22592 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/SignerDetailPage.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/SignerDetailPage.tsx
@@ -18,7 +18,6 @@ import {
} from "lucide-react";
import { createNotification } from "@app/components/notifications";
-import { PageHeader } from "@app/components/v2";
import {
AlertDialog,
AlertDialogAction,
@@ -39,6 +38,7 @@ import {
Empty,
EmptyHeader,
EmptyTitle,
+ PageHeader,
PageLoader,
Tabs,
TabsContent,
@@ -143,19 +143,17 @@ export const SignerDetailPage = () => {
</Helmet>
<div className="h-full bg-bunker-800">
<div className="mx-auto flex flex-col text-white">
- <div className="mx-auto mb-6 w-full max-w-8xl">
- <div className="mb-4">
- <Link
- to={ROUTE_PATHS.CertManager.CodeSigningPage.path}
- params={{ orgId: currentOrg.id, projectId: currentProject.id }}
- className="flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
- >
- <ChevronLeftIcon size={16} />
- Back to Signers
- </Link>
- </div>
-
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col gap-8">
<PageHeader
+ backLink={
+ <Link
+ to={ROUTE_PATHS.CertManager.CodeSigningPage.path}
+ params={{ orgId: currentOrg.id, projectId: currentProject.id }}
+ >
+ <ChevronLeftIcon size={16} />
+ Back to Signers
+ </Link>
+ }
scope={ProjectType.CertificateManager}
icon={PenTool}
title={