diff --git a/ui/src/pages/vendor/CertificatesPage.tsx b/ui/src/pages/vendor/CertificatesPage.tsx
index 37eb9f3..a2c0dfb 100644
--- a/ui/src/pages/vendor/CertificatesPage.tsx
+++ b/ui/src/pages/vendor/CertificatesPage.tsx
@@ -7,7 +7,7 @@ import {
Spinner,
useToast,
} from '@cameleer/design-system';
-import { Upload, ShieldCheck, RotateCcw, Trash2, AlertTriangle } from 'lucide-react';
+import { Upload, ShieldCheck, RotateCcw, Trash2 } from 'lucide-react';
import {
useVendorCertificates,
useStageCertificate,
@@ -35,6 +35,12 @@ function expiryColor(iso: string | null | undefined): string | undefined {
return undefined;
}
+function shortenFingerprint(fp: string | null | undefined): string {
+ if (!fp) return '—';
+ // Show first 23 chars (8 hex pairs) + ellipsis
+ return fp.length > 23 ? fp.slice(0, 23) + '...' : fp;
+}
+
function CertCard({
cert,
title,
@@ -68,8 +74,8 @@ function CertCard({
Fingerprint
-
- {cert.fingerprint}
+
+ {shortenFingerprint(cert.fingerprint)}
@@ -94,6 +100,34 @@ function CertCard({
);
}
+function FileField({ label, inputRef, accept }: {
+ label: string;
+ inputRef: React.RefObject
;
+ accept: string;
+}) {
+ return (
+
+
+
+
+ );
+}
+
export function CertificatesPage() {
const { toast } = useToast();
const { data, isLoading, isError } = useVendorCertificates();
@@ -143,7 +177,6 @@ export function CertificatesPage() {
const result = await stageMutation.mutateAsync(formData);
if (result.valid) {
toast({ title: 'Certificate staged successfully', variant: 'success' });
- // Clear file inputs
if (certInputRef.current) certInputRef.current.value = '';
if (keyInputRef.current) keyInputRef.current.value = '';
if (caInputRef.current) caInputRef.current.value = '';
@@ -192,13 +225,12 @@ export function CertificatesPage() {
{data.staleTenantCount > 0 && (
-
{data.staleTenantCount} tenant{data.staleTenantCount > 1 ? 's' : ''} need a restart
to pick up the updated CA bundle.
)}
-
+
{data.active && (
)}
@@ -251,24 +283,9 @@ export function CertificatesPage() {
{/* Upload card */}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+