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
fix column
Thiago Araujo da Silvaafbadf815271
diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsxindex 4db383ed87..4d84f7c911 100644--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/AuditLogStreamForm/AuditLogStreamProductsField.tsx@@ -30,7 +30,7 @@ export const auditLogStreamFiltersSchema = z.object({// Display labels for each product. Shared with the stream table so naming stays consistent.export const AUDIT_LOG_STREAM_PRODUCT_LABELS: Record<AuditLogStreamProduct, string> = {[AuditLogStreamProduct.SecretManager]: "Secret Management",- [AuditLogStreamProduct.CertificateManager]: "Certificate Manager (PKI)",+ [AuditLogStreamProduct.CertificateManager]: "Certificate Manager",[AuditLogStreamProduct.KMS]: "KMS",[AuditLogStreamProduct.SecretScanning]: "Secret Scanning",[AuditLogStreamProduct.PAM]: "PAM",@@ -145,8 +145,8 @@ export const ProductsField = () => {const next = (newValue as MultiValue<ProductOption>).map((option) => option.value)- .filter((productValue): productValue is AuditLogStreamProduct =>- productValue !== ALL_VALUE+ .filter(+ (productValue): productValue is AuditLogStreamProduct => productValue !== ALL_VALUE);// Empty selection is "stream everything" — selecting every product is the same intent,// so normalize it back to an empty list.diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamProductBadges.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamProductBadges.tsxnew file mode 100644index 0000000000..274e880030--- /dev/null+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamProductBadges.tsx@@ -0,0 +1,85 @@+import {+ Badge,+ Popover,+ PopoverContent,+ PopoverTrigger,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";+import { AuditLogStreamProduct } from "@app/hooks/api/auditLogStreams/enums";++import { AUDIT_LOG_STREAM_PRODUCT_LABELS } from "../AuditLogStreamForm/AuditLogStreamProductsField";++type Props = {+ products: AuditLogStreamProduct[];+ // Pills rendered inline before collapsing the rest into a "+N" popover.+ maxVisible?: number;+};++const DEFAULT_MAX_VISIBLE = 2;++const getProductLabel = (product: AuditLogStreamProduct) =>+ AUDIT_LOG_STREAM_PRODUCT_LABELS[product];++const ProductBadge = ({+ product,+ className+}: {+ product: AuditLogStreamProduct;+ className?: string;+}) => (+ <Badge variant="neutral" isTruncatable className={`max-w-[10rem] ${className ?? ""}`}>+ {getProductLabel(product)}+ </Badge>+);++export const AuditLogStreamProductBadges = ({+ products,+ maxVisible = DEFAULT_MAX_VISIBLE+}: Props) => {+ // No products configured means the stream receives every product.+ if (products.length === 0) {+ return <span className="text-sm text-mineshaft-400">All products</span>;+ }++ // Sort by displayed label so order is stable regardless of how the list was stored.+ const sortedProducts = [...products].sort((a, b) =>+ getProductLabel(a).localeCompare(getProductLabel(b), undefined, { sensitivity: "base" })+ );+ const visible = sortedProducts.slice(0, maxVisible);+ const overflow = sortedProducts.slice(maxVisible);++ return (+ <div className="flex items-center gap-1.5">+ {visible.map((product) => (+ <ProductBadge key={product} product={product} />+ ))}+ {overflow.length > 0 && (+ <Popover>+ <Tooltip>+ <TooltipTrigger className="flex h-4 items-center">+ <PopoverTrigger asChild>+ <Badge variant="neutral" asChild>+ <button type="button" onClick={(e) => e.stopPropagation()}>+ +{overflow.length}+ </button>+ </Badge>+ </PopoverTrigger>+ </TooltipTrigger>+ <TooltipContent>Click to view additional products</TooltipContent>+ </Tooltip>+ <PopoverContent+ side="right"+ className="flex w-auto max-w-sm flex-wrap gap-1.5"+ onClick={(e) => e.stopPropagation()}+ >+ {overflow.map((product) => (+ <ProductBadge key={product} product={product} className="z-10" />+ ))}+ </PopoverContent>+ </Popover>+ )}+ </div>+ );+};diff --git a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamRow.tsx b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamRow.tsxindex dfa02652d6..6df5e303b3 100644--- a/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamRow.tsx+++ b/frontend/src/pages/organization/AuditLogsPage/components/AuditLogStreamTab/components/AuditLogStreamRow.tsx@@ -13,13 +13,12 @@ import {Tooltip,Tr} from "@app/components/v2";-import { Badge } from "@app/components/v3";import { OrgPermissionSubjects } from "@app/context";import { OrgPermissionActions } from "@app/context/OrgPermissionContext/types";import { AUDIT_LOG_STREAM_PROVIDER_MAP, getProviderUrl } from "@app/helpers/auditLogStreams";import { TAuditLogStream } from "@app/hooks/api/types";-import { AUDIT_LOG_STREAM_PRODUCT_LABELS } from "../AuditLogStreamForm/AuditLogStreamProductsField";+import { AuditLogStreamProductBadges } from "./AuditLogStreamProductBadges";type Props = {logStream: TAuditLogStream;@@ -67,18 +66,7 @@ export const AuditLogStreamRow = ({ logStream, onDelete, onEditCredentials }: Pr</div></Td><Td>- {products.length === 0 ? (- <span className="text-sm text-mineshaft-400">All products</span>- ) : (- <Tooltip- content={products.map((product) => AUDIT_LOG_STREAM_PRODUCT_LABELS[product]).join(", ")}- >- <div className="flex w-fit flex-wrap items-center gap-1">- <Badge variant="info">{AUDIT_LOG_STREAM_PRODUCT_LABELS[products[0]]}</Badge>- {products.length > 1 && <Badge variant="info">{`+${products.length - 1}`}</Badge>}- </div>- </Tooltip>- )}+ <AuditLogStreamProductBadges products={products} /></Td><Td><div className="flex items-center justify-end gap-2">