'use client'; import { Stat, StatusDot } from '@/components/ui/primitives'; import { fmt, fmtBytes, fmtInt, fmtPct } from '@/lib/format'; import { Time } from '@/lib/time'; import type { AdminOverview } from '@/lib/types'; import { AdminPage, ErrorNote, Ok, Panel, useAdmin } from './shared'; export function Overview() { const { data: o, err, loading, reload } = useAdmin('/overview'); return ( {loading ? 'refreshing…' : 'refresh'} } > {o && (
} className="lg:col-span-2">
} /> 5000 ? 'var(--warn)' : undefined }}>{`${fmtInt(o.engine.cycle_ms_max)} ms`}} /> {fmtInt(o.engine.errors_1h)}} />
{o.probes.filter((p) => p.status === 'online').length}/{o.probes.length} online} className="lg:col-span-2">
{o.probes.map((p) => ( ))}
Probe Status Uptime 24h Clock Missing 1h Error rate 1h Buffered Spool Version Last health
{p.probe_id} {p.region} {fmtPct(p.health?.uptime_24h, 2)} 50 ? 'var(--warn)' : undefined }}> {p.health ? `${p.health.clock_offset_ms > 0 ? '+' : ''}${p.health.clock_offset_ms} ms` : '—'} {fmtPct(p.health?.missing_ratio_1h, 2)} 0.05 ? 'var(--warn)' : undefined }}> {fmtPct(p.health?.error_rate_1h, 2)} {fmtInt(p.health?.buffered)} {fmtBytes(p.health?.spool_bytes)} {p.health?.version ?? p.version}
{fmtInt(o.ingest.rejected_per_min)}} /> } />
}>
c.fresh).length}/${o.bgp.collectors.length}`} />
    {o.bgp.collectors.map((c) => (
  • {c.id}
  • ))}
} sub={`${fmt(o.stores.clickhouse.inserts_per_s)} inserts/s`} /> } sub={fmtBytes(o.stores.postgres.size_bytes)} /> } sub={`${fmtBytes(o.stores.redis.used_memory_bytes)} · ${fmtInt(o.stores.redis.keys)} keys`} />
{o.stores.clickhouse.tables.map((t) => ( ))}
ClickHouse table Rows Bytes Oldest Newest
{t.name} {fmtInt(t.rows)} {fmtBytes(t.bytes)}
{o.corroboration.map((c) => ( ))}
Connector State Last fetch Incidents declared
{c.name} {c.id} {fmtInt(c.incidents)}
)}
); }