Skip to content

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

fix(ui): cert-manager sync and signers table polish

Scott Wilsone76af59c4f75
diff --git a/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx b/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx
index 433435ec03..17badf7be2 100644
--- a/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx
+++ b/frontend/src/components/pki-syncs/forms/CreatePkiSyncForm.tsx
@@ -333,7 +333,7 @@ export const CreatePkiSyncForm = ({
<Field className="mt-2">
<Field orientation="horizontal">
<FieldContent>
- <Label htmlFor="auto-sync-enabled">Auto-sync on Change</Label>
+ <Label htmlFor="auto-sync-enabled">Auto-sync on change</Label>
<FieldDescription>
When certificates in the selected list change, sync automatically. Turn
off to only sync manually.
diff --git a/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx b/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx
index 783f365caa..8bfa78cc35 100644
--- a/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx
+++ b/frontend/src/components/pki-syncs/forms/EditPkiSyncForm.tsx
@@ -163,7 +163,7 @@ export const EditPkiSyncForm = ({ pkiSync, onComplete, onDirtyChange, onCancel }
<Field className="mt-2">
<Field orientation="horizontal">
<FieldContent>
- <Label htmlFor="auto-sync-enabled">Auto-sync on Change</Label>
+ <Label htmlFor="auto-sync-enabled">Auto-sync on change</Label>
<FieldDescription>
When certificates in the selected list change, sync automatically. Turn off
to only sync manually.
diff --git a/frontend/src/pages/cert-manager/CodeSigningPage/components/SignersTable.tsx b/frontend/src/pages/cert-manager/CodeSigningPage/components/SignersTable.tsx
index 9d92a3bece..5e6a07ee9d 100644
--- a/frontend/src/pages/cert-manager/CodeSigningPage/components/SignersTable.tsx
+++ b/frontend/src/pages/cert-manager/CodeSigningPage/components/SignersTable.tsx
@@ -109,91 +109,98 @@ export const SignersTable = ({ projectId, onCreateSigner }: Props) => {
/>
</InputGroup>
</div>
- <Table>
- <TableHeader>
- <TableRow>
- <TableHead>Name</TableHead>
- <TableHead>Status</TableHead>
- <TableHead>Certificate CN</TableHead>
- <TableHead>Certificate Expiry</TableHead>
- <TableHead>Last Signed</TableHead>
- </TableRow>
- </TableHeader>
- <TableBody>
- {!isLoading &&
- signers.map((signer) => (
- <TableRow
- key={signer.id}
- className="cursor-pointer hover:bg-mineshaft-700"
- onClick={() =>
- navigate({
- to: "/organizations/$orgId/projects/cert-manager/$projectId/code-signing/$signerId",
- params: {
- orgId: currentOrg.id,
- projectId,
- signerId: signer.id
- }
- })
- }
- >
- <TableCell>{signer.name}</TableCell>
- <TableCell onClick={(e) => e.stopPropagation()} className="cursor-default">
- {signer.certificateFailureReason &&
- (signer.status === SignerStatus.Failed ||
- signer.status === SignerStatus.Pending) ? (
- <Tooltip>
- <TooltipTrigger asChild>
- <span className="inline-flex cursor-help items-center gap-1.5">
- <Badge variant={getSignerStatusBadgeVariant(signer.status)}>
- {signerStatusLabels[signer.status] ?? signer.status}
- </Badge>
+ {isLoading || signers.length > 0 ? (
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead>Name</TableHead>
+ <TableHead>Status</TableHead>
+ <TableHead>Certificate CN</TableHead>
+ <TableHead>Certificate Expiry</TableHead>
+ <TableHead>Last Signed</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ {!isLoading &&
+ signers.map((signer) => (
+ <TableRow
+ key={signer.id}
+ className="cursor-pointer hover:bg-mineshaft-700"
+ onClick={() =>
+ navigate({
+ to: "/organizations/$orgId/projects/cert-manager/$projectId/code-signing/$signerId",
+ params: {
+ orgId: currentOrg.id,
+ projectId,
+ signerId: signer.id
+ }
+ })
+ }
+ >
+ <TableCell>{signer.name}</TableCell>
+ <TableCell onClick={(e) => e.stopPropagation()} className="cursor-default">
+ {signer.certificateFailureReason &&
+ (signer.status === SignerStatus.Failed ||
+ signer.status === SignerStatus.Pending) ? (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span className="inline-flex cursor-help items-center gap-1.5">
+ <Badge variant={getSignerStatusBadgeVariant(signer.status)}>
+ {signerStatusLabels[signer.status] ?? signer.status}
+ </Badge>
+ {signer.status === SignerStatus.Pending && (
+ <AlertTriangleIcon
+ className="size-3.5 shrink-0 text-warning"
+ aria-hidden
+ />
+ )}
+ </span>
+ </TooltipTrigger>
+ <TooltipContent
+ side="top"
+ align="start"
+ className="max-w-[320px] text-pretty break-words"
+ >
{signer.status === SignerStatus.Pending && (
- <AlertTriangleIcon
- className="size-3.5 shrink-0 text-warning"
- aria-hidden
- />
+ <span className="mb-0.5 block text-[10px] tracking-wide text-muted uppercase">
+ Last attempt failed, retrying
+ </span>
)}
- </span>
- </TooltipTrigger>
- <TooltipContent
- side="top"
- align="start"
- className="max-w-[320px] text-pretty break-words"
- >
- {signer.status === SignerStatus.Pending && (
- <span className="mb-0.5 block text-[10px] tracking-wide text-muted uppercase">
- Last attempt failed, retrying
- </span>
- )}
- {signer.certificateFailureReason}
- </TooltipContent>
- </Tooltip>
- ) : (
- <Badge variant={getSignerStatusBadgeVariant(signer.status)}>
- {signerStatusLabels[signer.status] ?? signer.status}
- </Badge>
- )}
- </TableCell>
- <TableCell>{signer.certificateCommonName ?? "-"}</TableCell>
- <TableCell>
- {signer.certificateNotAfter
- ? format(new Date(signer.certificateNotAfter), "MMM d, yyyy")
- : "-"}
- </TableCell>
- <TableCell>
- {signer.lastSignedAt
- ? format(new Date(signer.lastSignedAt), "MMM d, yyyy HH:mm")
- : "Never"}
- </TableCell>
- </TableRow>
- ))}
- </TableBody>
- </Table>
- {!isLoading && signers.length === 0 && (
+ {signer.certificateFailureReason}
+ </TooltipContent>
+ </Tooltip>
+ ) : (
+ <Badge variant={getSignerStatusBadgeVariant(signer.status)}>
+ {signerStatusLabels[signer.status] ?? signer.status}
+ </Badge>
+ )}
+ </TableCell>
+ <TableCell>{signer.certificateCommonName ?? "-"}</TableCell>
+ <TableCell>
+ {signer.certificateNotAfter
+ ? format(new Date(signer.certificateNotAfter), "MMM d, yyyy")
+ : "-"}
+ </TableCell>
+ <TableCell>
+ {signer.lastSignedAt
+ ? format(new Date(signer.lastSignedAt), "MMM d, yyyy HH:mm")
+ : "Never"}
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ ) : (
<Empty className="border border-solid">
<EmptyHeader>
- <EmptyTitle>No signers yet</EmptyTitle>
- <EmptyDescription>Create a signer to start signing artifacts</EmptyDescription>
+ <EmptyTitle>
+ {debouncedSearch ? "No signers match search" : "No signers yet"}
+ </EmptyTitle>
+ <EmptyDescription>
+ {debouncedSearch
+ ? "Try adjusting your search"
+ : "Create a signer to start signing artifacts"}
+ </EmptyDescription>
</EmptyHeader>
</Empty>
)}
diff --git a/frontend/src/pages/cert-manager/IntegrationsListPage/components/PkiSyncsTab/PkiSyncTable/PkiSyncTableCell.tsx b/frontend/src/pages/cert-manager/IntegrationsListPage/components/PkiSyncsTab/PkiSyncTable/PkiSyncTableCell.tsx
index c3f37a9e48..b1bc5f74d6 100644
--- a/frontend/src/pages/cert-manager/IntegrationsListPage/components/PkiSyncsTab/PkiSyncTable/PkiSyncTableCell.tsx
+++ b/frontend/src/pages/cert-manager/IntegrationsListPage/components/PkiSyncsTab/PkiSyncTable/PkiSyncTableCell.tsx
@@ -1,10 +1,8 @@
import { ReactNode } from "react";
-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { InfoIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
-import { Tooltip } from "@app/components/v2";
-import { TableCell } from "@app/components/v3";
+import { TableCell, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";
export type PkiSyncTableCellProps = {
primaryText: string;
@@ -25,47 +23,34 @@ export const PkiSyncTableCell = ({
}: PkiSyncTableCellProps) => {
return (
<TableCell className="max-w-0 min-w-32!">
- <Tooltip
- side="left"
- className="max-w-2xl break-words"
- content={
- <>
- <p className="text-sm">{primaryText}</p>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <div>
+ <p className={twMerge("truncate text-sm", primaryClassName)}>
+ {primaryText}
+ {infoBadge === "primary" && (
+ <InfoIcon className="ml-1 inline-block size-3 text-accent" />
+ )}
+ </p>
{secondaryText && (
- <p className={twMerge("text-xs leading-3 text-bunker-300", secondaryClassName)}>
+ <p className={twMerge("truncate text-xs leading-4 text-accent", secondaryClassName)}>
{secondaryText}
+ {infoBadge === "secondary" && (
+ <InfoIcon className="ml-1 inline-block size-3 text-accent" />
+ )}
</p>
)}
- {additionalTooltipContent}
- </>
- }
- >
- <div>
- <p className={twMerge("truncate text-sm", primaryClassName)}>
- {primaryText}
- {infoBadge === "primary" && (
- <FontAwesomeIcon
- size="xs"
- icon={faInfoCircle}
- className="ml-1 inline-block text-bunker-300"
- />
- )}
- </p>
+ </div>
+ </TooltipTrigger>
+ <TooltipContent side="left" className="max-w-2xl break-words">
+ <p className="text-sm">{primaryText}</p>
{secondaryText && (
- <p
- className={twMerge("truncate text-xs leading-4 text-bunker-300", secondaryClassName)}
- >
+ <p className={twMerge("text-xs leading-3 text-accent", secondaryClassName)}>
{secondaryText}
- {infoBadge === "secondary" && (
- <FontAwesomeIcon
- size="xs"
- icon={faInfoCircle}
- className="ml-1 inline-block text-bunker-300"
- />
- )}
</p>
)}
- </div>
+ {additionalTooltipContent}
+ </TooltipContent>
</Tooltip>
</TableCell>
);
diff --git a/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/components/PkiSyncCertificatesSection.tsx b/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/components/PkiSyncCertificatesSection.tsx
index de8923f927..f949f9259f 100644
--- a/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/components/PkiSyncCertificatesSection.tsx
+++ b/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/components/PkiSyncCertificatesSection.tsx
@@ -13,10 +13,7 @@ import {
import { createNotification } from "@app/components/notifications";
import { CertificateManagementModal } from "@app/components/pki-syncs/CertificateManagementModal";
-import {
- CertificateDisplayName,
- getCertificateDisplayName
-} from "@app/components/utilities/certificateDisplayUtils";
+import { getCertificateDisplayName } from "@app/components/utilities/certificateDisplayUtils";
import {
Badge,
Card,
@@ -226,7 +223,7 @@ export const PkiSyncCertificatesSection = ({ pkiSync }: Props) => {
<Table>
<TableHeader>
<TableRow>
- <TableHead>SAN / CN</TableHead>
+ <TableHead className="w-full">SAN / CN</TableHead>
<TableHead>Certificate Status</TableHead>
<TableHead>Serial Number</TableHead>
<TableHead>External ID</TableHead>
@@ -268,7 +265,7 @@ export const PkiSyncCertificatesSection = ({ pkiSync }: Props) => {
altNames: syncCert.certificateAltNames,
commonName: syncCert.certificateCommonName
},
- 34,
+ undefined,
"Unknown"
);
@@ -278,14 +275,14 @@ export const PkiSyncCertificatesSection = ({ pkiSync }: Props) => {
<TableRow key={syncCert.id}>
<TableCell isTruncatable>
<div className="flex items-center gap-2">
- <CertificateDisplayName
- cert={{
- altNames: syncCert.certificateAltNames,
- commonName: syncCert.certificateCommonName
- }}
- maxLength={34}
- fallback="Unknown"
- />
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span className="truncate">{originalDisplayName}</span>
+ </TooltipTrigger>
+ <TooltipContent className="max-w-lg break-words">
+ {originalDisplayName}
+ </TooltipContent>
+ </Tooltip>
{supportsDefaultCertificate && isDefaultCertificate && (
<Badge variant="neutral">Default</Badge>
)}
@@ -298,7 +295,7 @@ export const PkiSyncCertificatesSection = ({ pkiSync }: Props) => {
</TableCell>
<TableCell isTruncatable>
<div
- className="truncate text-xs"
+ className="truncate"
title={syncCert.certificateSerialNumber || "Unknown"}
>
{truncateSerialNumber(syncCert.certificateSerialNumber)}
@@ -309,9 +306,7 @@ export const PkiSyncCertificatesSection = ({ pkiSync }: Props) => {
<div className="flex items-center gap-1">
<Tooltip>
<TooltipTrigger asChild>
- <span className="truncate text-xs">
- {syncCert.externalIdentifier}
- </span>
+ <span className="truncate">{syncCert.externalIdentifier}</span>
</TooltipTrigger>
<TooltipContent className="max-w-none whitespace-nowrap">
{syncCert.externalIdentifier}
@@ -323,7 +318,7 @@ export const PkiSyncCertificatesSection = ({ pkiSync }: Props) => {
/>
</div>
) : (
- <span className="text-xs">-</span>
+ <span className="text-muted">-</span>
)}
</TableCell>
<TableCell>