From 7d0a013b566e05be5548e55bf3e43ffd313ba602 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Thu, 25 Jun 2026 23:24:44 +0700 Subject: [PATCH] refactor: Update health check logic in ServiceRow component to conditionally display health status based on health check configuration, improving clarity and user feedback --- .../src/components/services-board/service-row.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/services-board/service-row.tsx b/apps/web/src/components/services-board/service-row.tsx index f185803..46df7fe 100644 --- a/apps/web/src/components/services-board/service-row.tsx +++ b/apps/web/src/components/services-board/service-row.tsx @@ -73,7 +73,7 @@ export const ServiceRow = memo(function ServiceRow({ const fqdn = serviceDisplayFqdn(service) const allFqdns = (service.domains ?? []).map((d) => bindingToFqdn(d)) const healthBindings = (service.domains ?? []).filter( - (d) => d.record_type === 'A' && (d.target_ips?.length ?? 0) > 0 && d.health_check_enabled, + (d) => d.record_type === 'A' && (d.target_ips?.length ?? 0) > 0, ) const style = transform @@ -208,11 +208,21 @@ export const ServiceRow = memo(function ServiceRow({ }) function BindingHealthBadge({ binding }: { binding: ServiceDomainBinding }) { + const enabled = Boolean(binding.health_check_enabled) const { data: health } = useAggregatedHealth( 'binding', binding.binding_id, - true, + enabled, ) + if (!enabled) { + return ( + + ) + } if (!health) return null return (