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 (
Health, last success and attempt, record counts of the last run, drift signals and license status per connector.
| Connector | Status | License | Health | Last success | Last attempt | Last run | Fetched | Created | Updated | Rejected | Drift | Runs |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {r.name} {r.slug} |
|
|
|
{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 ? |
{fmtInt(r.runs_total)} |