import type { Metadata } from 'next'; import Link from 'next/link'; import { EnabledToggle, RunNowButton } from '@/components/admin/actions'; import { AdminError, AdminHeader, JsonInline, RunsTable, SectionTitle, Tile, fmtBytes } from '@/components/admin/ui'; import { RunStatusPill, fmtDuration, fmtInterval, fmtUntil } from '@/components/meta/connectors-table'; import { adminApi, safeAdmin } from '@/lib/admin-api'; import { fmtAgo, fmtDateTime, fmtInt, num } from '@/lib/format'; export const metadata: Metadata = { title: 'Overview' }; export default async function AdminOverviewPage() { const res = await safeAdmin(adminApi.overview()); if (res.error !== null) { return ( <> ); } const d = res.data.data; const now = Date.now(); const db = d.database; const openFlags = d.quality.reduce((acc, q) => acc + (num(q.open) ?? 0), 0); return ( <> Public status →} />
0 ? 'warn' : undefined} href="/admin/data-quality" /> 0 ? 'warn' : undefined} href="/admin/entity-resolution" />
Connectors
{d.connectors.map((c) => { const circuitOpen = !!c.circuit_open_until && new Date(c.circuit_open_until).getTime() > now; return ( ); })}
Connector Status Last success Next run Duration Failures Errors 7 d Circuit Actions
{c.name}
{c.source_name} · every {fmtInterval(c.interval_seconds)} · priority {c.priority} {!c.enabled && disabled}
{c.description &&
{c.description}
}
{fmtAgo(c.last_success_at, now)} {c.enabled ? fmtUntil(c.next_run_at, now) : '—'} {fmtDuration(c.last_duration_ms)} 0 ? 'text-warn' : 'text-ink-2'}`}> {fmtInt(c.consecutive_failures)} 0 ? 'text-warn' : 'text-ink-2'}`}> {fmtInt(c.errors_7d)} {circuitOpen ? open · resets {fmtUntil(c.circuit_open_until, now)} : closed}

“Run now” pushes a job to the Redis queue consumed by the scheduler (si schedule). If Redis is down the job is not visible to the scheduler and the button says so. Enabling a connector also resets its circuit breaker.

{d.failed_jobs.length > 0 && ( <> Failed jobs )} Recent runs {d.recent_runs.some((r) => r.meta) && (
Run metadata (latest 5)
    {d.recent_runs.slice(0, 5).map((r) => (
  • {r.connector_name}
  • ))}
)} ); }