fix(services): считать failover по IP Health а не по строке ноды
quality / commitlint (push) Skipped
quality / changes (push) Successful in 9s
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 4s
quality / web (push) Successful in 52s
quality / api (push) Successful in 42s
CD / quality (push) Successful in 1m50s
CD / publish (push) Successful in 1m43s

Панель брала service_nodes, которую затирал group apply.
Теперь тот же binding ip_health, что таблица активов; group не пишет в ноду.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-08-20 15:08:10 +07:00
co-authored by Cursor
parent 994e79e118
commit 7938d2f707
7 changed files with 161 additions and 75 deletions
@@ -54,7 +54,7 @@ export function FailoverTimeline({ events }: { events: FailoverEvent[] }) {
<EmptyState
icon={ShieldCheckIcon}
title="Пул в DNS на месте"
description="Красным только адреса, которых нет в активном пуле A-записей"
description="Standby и last-resort не красные только down, снятые с A-записей"
stackedIcon={false}
centered={false}
/>
@@ -84,9 +84,11 @@ export function FailoverTimeline({ events }: { events: FailoverEvent[] }) {
/>
</TimelineTitle>
<TimelineDate>
{failStreakLabel(event.consecutiveFailures)}
{event.consecutiveFailures > 0
? failStreakLabel(event.consecutiveFailures)
: null}
{checkedIso
? ` · ${formatRelative(checkedIso)} · ${formatDate(checkedIso)}`
? `${event.consecutiveFailures > 0 ? ' · ' : ''}${formatRelative(checkedIso)} · ${formatDate(checkedIso)}`
: null}
</TimelineDate>
</TimelineHeader>
@@ -3,7 +3,7 @@ import { UnplugIcon } from 'lucide-react'
import { FailoverTimeline } from '@/components/failover-timeline'
import {
toFailoverEvents,
type FailoverNodeInput,
type FailoverHealthInput,
} from '@/lib/failover-events'
import { Badge } from '@/components/reui/badge'
import {
@@ -39,13 +39,13 @@ function failoverCountLabel(count: number): string {
* Docs: https://reui.io/docs/components/base/alert
*/
export function ServiceFailoverPanel({
nodes,
ipHealth,
activeAddresses,
}: {
nodes: readonly FailoverNodeInput[]
ipHealth: readonly FailoverHealthInput[]
activeAddresses: readonly string[]
}) {
const events = toFailoverEvents(nodes, activeAddresses)
const events = toFailoverEvents(ipHealth, activeAddresses)
return (
<Frame stacked spacing="sm" className="min-w-0 w-full">
@@ -64,7 +64,7 @@ export function ServiceFailoverPanel({
)}
</FrameTitle>
<FrameDescription>
Только адреса, которых нет в DNS-пуле · не статус строки ноды
Только down из IP Health вне DNS-пула · как таблица активов
</FrameDescription>
</FrameHeader>