"use client"; /** * `` — compact at-a-glance system snapshot for the * `/admin` overview landing page. * * The full breakdown lives in `` at * `/admin/system-status`; this component only surfaces the handful of * facts an admin wants on the overview screen: app version, database * up/down, worker running, image build SHA + timestamp, and the * server-process start time. Same `useSystemStatus()` data source so we * don't re-fetch. */ import { Clock, Cog, Database, Globe, Loader2, Server } from "lucide-react"; import { formatDateTime } from "@/lib/format"; import { SettingsCard } from "@/components/settings/settings-card"; import { SettingsCardHeader } from "@/components/settings/_card-header"; import { useTranslations } from "@/lib/i18n/context"; import { StatusItem, usePublicVersion, useSystemStatus } from "./_shared"; export function SystemStatusSummary() { const { t } = useTranslations(); const { data: status, isError } = useSystemStatus(); const { data: version } = usePublicVersion(); return ( {status ? (
{/* v1.4.27 R5 — surface the offline-geo state so the maintainer spots the missing MAXMIND_LICENSE_KEY without crawling logs. The field is undefined on legacy responses; the row only renders when /api/version answers the new shape. */} {version?.offlineGeoEnabled !== undefined && ( )}
) : isError ? (
{t("admin.overview.snapshotLoadError")}
) : (
)}
); }