import { useState } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { getCertificate, getCertificateVersions, triggerRenewal, triggerDeployment, archiveCertificate, revokeCertificate, updateCertificate, getTargets, getJobs, getPolicies, getProfiles, getProfile, downloadCertificatePEM, exportCertificatePKCS12 } from '../api/client'; import { REVOCATION_REASONS } from '../api/types'; import PageHeader from '../components/PageHeader'; import StatusBadge from '../components/StatusBadge'; import ErrorState from '../components/ErrorState'; import { formatDate, formatDateTime, daysUntil, expiryColor, timeAgo } from '../api/utils'; import type { Job } from '../api/types'; function InfoRow({ label, value, editable, onEdit }: { label: string; value: React.ReactNode; editable?: boolean; onEdit?: () => void }) { return (
No versions yet
) : (Downloads a .p12 file containing the certificate chain. Private keys are not included (they remain on the agent).
setPkcs12Password(e.target.value)} placeholder="Leave empty for no encryption" className="w-full bg-white border border-surface-border rounded px-3 py-2 text-sm text-ink mb-4 focus:outline-none focus:border-brand-400" />This action cannot be undone. The certificate will be added to the CRL and marked as revoked.
{revokeMutation.isError && (