import { EmptyPanel, ErrorPanel, PageHeader, Td, Th } from "@/components/DataPanel";
import { Pager } from "@/components/Pager";
import { api } from "@/lib/api";
import { fmtDate, statusBadgeClass } from "@/lib/format";
export const dynamic = "force-dynamic";
export default async function EventsPage({
searchParams,
}: {
searchParams: Promise<{ cursor?: string; agent_id?: string; check_id?: string }>;
}) {
const sp = await searchParams;
let data;
try {
data = await api.queryEvents({
agent_id: sp.agent_id,
check_id: sp.check_id,
cursor: sp.cursor,
});
} catch (e) {
return
| observed_at | received_at | agent_id | check_id | status | exit | duration_ms | output |
|---|---|---|---|---|---|---|---|
| {fmtDate(e.observed_at)} | {fmtDate(e.received_at)} | {e.agent_id} | {e.check_id} | {e.status} | {e.exit_code} | {e.duration_ms} | {e.output ?? "—"} |