diff --git a/frontend/src/pages/HostDetailPage.tsx b/frontend/src/pages/HostDetailPage.tsx
index 472f471..edb6324 100644
--- a/frontend/src/pages/HostDetailPage.tsx
+++ b/frontend/src/pages/HostDetailPage.tsx
@@ -320,10 +320,10 @@ interface KeyDisplayDialogProps {
}
function KeyDisplayDialog({ open, cert, hostname, onClose }: KeyDisplayDialogProps) {
- const [copiedField, setCopiedField] = useState<'ca' | 'cert' | 'key' | 'server-cert' | 'server-key' | null>(null)
+ const [copiedField, setCopiedField] = useState<'ca' | 'server-cert' | 'server-key' | null>(null)
const [downloading, setDownloading] = useState(false)
- const handleCopy = async (text: string, field: 'ca' | 'cert' | 'key' | 'server-cert' | 'server-key') => {
+ const handleCopy = async (text: string, field: 'ca' | 'server-cert' | 'server-key') => {
await navigator.clipboard.writeText(text)
setCopiedField(field)
setTimeout(() => setCopiedField(null), 2000)
@@ -335,15 +335,13 @@ function KeyDisplayDialog({ open, cert, hostname, onClose }: KeyDisplayDialogPro
try {
const zip = new JSZip()
zip.file('ca.crt', cert.ca_root_pem)
- zip.file('client.crt', cert.cert_pem)
- zip.file('client.key', cert.key_pem)
zip.file('server.crt', cert.server_cert_pem)
zip.file('server.key', cert.server_key_pem)
const blob = await zip.generateAsync({ type: 'blob' })
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
- a.download = `${hostname || 'host'}-certs.zip`
+ a.download = `${hostname || 'host'}-agent-certs.zip`
a.click()
URL.revokeObjectURL(url)
} finally {
@@ -365,16 +363,15 @@ function KeyDisplayDialog({ open, cert, hostname, onClose }: KeyDisplayDialogPro
return (
)
@@ -726,22 +699,6 @@ export default function HostDetailPage() {
}
}
- // ── Download client cert ─────────────────────────────────────────────────
- const handleDownloadClientCert = async () => {
- if (!id) return
- try {
- const res = await certsApi.downloadClientCert(id)
- const url = URL.createObjectURL(res.data as Blob)
- const a = document.createElement('a')
- a.href = url
- a.download = 'client.crt'
- a.click()
- URL.revokeObjectURL(url)
- } catch {
- showSnack('No client certificate found for this host', 'error')
- }
- }
-
// ── Issue client certificate ──────────────────────────────────────────────
const handleOpenIssueCert = () => {
setIssueCertHostname(String(host?.fqdn ?? ''))
@@ -930,11 +887,7 @@ export default function HostDetailPage() {
Re-issue Certificate
)}
-
-
-
-
-
+