From 3d9b2d4917127adaa4b496c53be6fe73ba22bf36 Mon Sep 17 00:00:00 2001 From: Echo Date: Wed, 6 May 2026 03:51:40 +0000 Subject: [PATCH] fix: health checks list not showing - API returns {checks:[...]} not array - Fixed data extraction: use res.data?.checks instead of Array.isArray(res.data) - Added Target column to health checks table showing service_name or URL - Matches the pattern used by maintenance windows (res.data?.windows) --- frontend/src/pages/HostDetailPage.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/HostDetailPage.tsx b/frontend/src/pages/HostDetailPage.tsx index edb6324..7c35857 100644 --- a/frontend/src/pages/HostDetailPage.tsx +++ b/frontend/src/pages/HostDetailPage.tsx @@ -631,7 +631,7 @@ export default function HostDetailPage() { setHcLoading(true) try { const res = await healthChecksApi.list(id) - setHealthChecks(Array.isArray(res.data) ? res.data : []) + setHealthChecks(res.data?.checks ?? []) } catch { /* ignore */ } finally { setHcLoading(false) } }, [id]) @@ -1019,6 +1019,7 @@ export default function HostDetailPage() { Name Type Status + Target Enabled Detail Latency @@ -1033,6 +1034,13 @@ export default function HostDetailPage() { + + + {check.check_type === 'service' + ? (check.service_name ?? '—') + : (check.url ?? '—')} + + {check.last_result ? ( check.last_result.healthy ? (