Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
truncation and UI tweaks
x0322059054db80ad28
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsxindex 5c44988bb9..16166c88ce 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsx@@ -12,9 +12,15 @@ export const OCIVaultSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Compartment OCID">{compartmentOcid}</GenericFieldLabel>- <GenericFieldLabel label="Vault OCID">{vaultOcid}</GenericFieldLabel>- <GenericFieldLabel label="Key OCID">{keyOcid}</GenericFieldLabel>+ <GenericFieldLabel label="Compartment OCID" truncate>+ {compartmentOcid}+ </GenericFieldLabel>+ <GenericFieldLabel label="Vault OCID" truncate>+ {vaultOcid}+ </GenericFieldLabel>+ <GenericFieldLabel label="Key OCID" truncate>+ {keyOcid}+ </GenericFieldLabel></>);};diff --git a/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsx b/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsxindex 5200e18985..95eaf57451 100644--- a/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsx+++ b/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsx@@ -6,14 +6,21 @@ type Props = {children?: ReactNode;className?: string;labelClassName?: string;+ truncate?: boolean;};-export const GenericFieldLabel = ({ label, children, className, labelClassName }: Props) => {+export const GenericFieldLabel = ({+ label,+ children,+ className,+ labelClassName,+ truncate+}: Props) => {return (- <div className={className}>+ <div className={twMerge("min-w-0", className)}><p className={twMerge("text-xs font-medium text-mineshaft-400", labelClassName)}>{label}</p>{children ? (- <p className="text-sm text-mineshaft-100">{children}</p>+ <p className={twMerge("text-sm text-mineshaft-100", truncate && "truncate")}>{children}</p>) : (<p className="text-sm italic text-mineshaft-400/50">None</p>)}diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsxindex 19445a6525..8a987ae26b 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsx@@ -1,4 +1,5 @@import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Tooltip } from "@app/components/v2";import { TOCIVaultSync } from "@app/hooks/api/secretSyncs/types/oci-vault-sync";type Props = {@@ -12,9 +13,30 @@ export const OCIVaultSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Compartment OCID">{compartmentOcid}</GenericFieldLabel>- <GenericFieldLabel label="Vault OCID">{vaultOcid}</GenericFieldLabel>- <GenericFieldLabel label="Key OCID">{keyOcid}</GenericFieldLabel>+ <Tooltip side="bottom" className="max-w-sm select-text break-words" content={compartmentOcid}>+ <div>+ <GenericFieldLabel label="Compartment OCID">+ {compartmentOcid.substring(0, 21)}...+ {compartmentOcid.substring(compartmentOcid.length - 6)}+ </GenericFieldLabel>+ </div>+ </Tooltip>+ <Tooltip side="bottom" className="max-w-sm select-text break-words" content={compartmentOcid}>+ <div>+ <GenericFieldLabel label="Vault OCID">+ {vaultOcid.substring(0, 15)}...+ {vaultOcid.substring(vaultOcid.length - 6)}+ </GenericFieldLabel>+ </div>+ </Tooltip>+ <Tooltip side="bottom" className="max-w-sm select-text break-words" content={compartmentOcid}>+ <div>+ <GenericFieldLabel label="Key OCID">+ {keyOcid.substring(0, 13)}...+ {keyOcid.substring(keyOcid.length - 6)}+ </GenericFieldLabel>+ </div>+ </Tooltip></>);};