feat(domains): cert error Tooltip mit last_error im Domain-Detail
Abgelaufene und fehlerhafte Zertifikate zeigen jetzt beim Hover den Fehlertext (last_error) aus der DB. TLSCertLite um last_error erweitert. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,7 @@ interface TLSCertLite {
|
||||
domain: string
|
||||
status: 'pending' | 'active' | 'renewing' | 'expired' | 'error'
|
||||
not_after?: string | null
|
||||
last_error?: string | null
|
||||
}
|
||||
|
||||
interface HAProxyStat { backend: string; server: string; status: string }
|
||||
@@ -165,8 +166,16 @@ export default function DomainDetailPage() {
|
||||
|
||||
const certBadge = () => {
|
||||
if (!cert) return <Tag icon={<LockOutlined />} color="default">{t('domains.tlsCertNone')}</Tag>
|
||||
if (cert.status === 'expired') return <Tag icon={<LockOutlined />} color="red">{t('domains.tlsCertExpired')}</Tag>
|
||||
if (cert.status === 'error') return <Tag icon={<LockOutlined />} color="red">{t('domains.tlsCertError')}</Tag>
|
||||
if (cert.status === 'expired') return (
|
||||
<Tooltip title={cert.last_error ?? cert.not_after}>
|
||||
<Tag icon={<LockOutlined />} color="red">{t('domains.tlsCertExpired')}</Tag>
|
||||
</Tooltip>
|
||||
)
|
||||
if (cert.status === 'error') return (
|
||||
<Tooltip title={cert.last_error}>
|
||||
<Tag icon={<LockOutlined />} color="red">{t('domains.tlsCertError')}</Tag>
|
||||
</Tooltip>
|
||||
)
|
||||
const days = cert.not_after
|
||||
? Math.round((new Date(cert.not_after).getTime() - Date.now()) / 86_400_000)
|
||||
: null
|
||||
|
||||
Reference in New Issue
Block a user