import Link from 'next/link'; import { Section } from '@/components/ui/section'; import { Badge, StatusBadge } from '@/components/ui/badge'; import { EmptyState } from '@/components/ui/empty-state'; import { connectorHealth } from '@/lib/queries/admin'; import { fmtDateTime, fmtInt, relativeTime } from '@/lib/format'; export default async function AdminConnectorsPage() { const rows = await connectorHealth(); return (

Connectors

Health, last success and attempt, record counts of the last run, drift signals and license status per connector.

{rows.length ? (
{rows.map((r) => ( ))}
Connector Status License Health Last success Last attempt Last run Fetched Created Updated Rejected Drift Runs
{r.name} {r.slug} {r.license_status} {r.paused ? paused : null} {r.health_detail ? {r.health_detail} : null} {r.last_success_at ? relativeTime(r.last_success_at) : '—'} {r.last_attempt_at ? relativeTime(r.last_attempt_at) : '—'} {r.last_run_id ? ( <> {r.last_run_id} {' '} ) : ( — )} {r.records_fetched == null ? '—' : fmtInt(r.records_fetched)} {r.records_created == null ? '—' : fmtInt(r.records_created)} {r.records_updated == null ? '—' : fmtInt(r.records_updated)} {r.records_rejected == null ? '—' : fmtInt(r.records_rejected)} {r.schema_drift?.length ? {r.schema_drift.length} drift : none} {r.drift_fields ? {fmtInt(r.drift_fields)} fields tracked : null} {fmtInt(r.runs_total)}
) : ( No connector registered. )}
); }