import { DbAdminPage } from "@agent-native/core/client/db-admin"; import { useT } from "@agent-native/core/client/i18n"; import { ObservabilityDashboard } from "@agent-native/core/client/observability"; import { IconActivity, IconArrowUpRight, IconDatabase, IconHistory, IconMessages, IconSend, } from "@tabler/icons-react"; import { Link, useSearchParams } from "react-router"; import { DispatchShell } from "../../components/dispatch-shell"; import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../components/ui/tabs"; type OperationsView = "monitoring" | "database"; function selectedView(value: string | null): OperationsView { return value === "database" ? "database" : "monitoring"; } function OperationsShortcuts() { const t = useT(); const tools = [ { to: "/admin/thread-debug", icon: IconMessages, title: t("dispatch.nav.threadDebug", { defaultValue: "Thread debug" }), }, { to: "/admin/audit", icon: IconHistory, title: t("dispatch.nav.audit"), }, { to: "/admin/destinations", icon: IconSend, title: t("dispatch.pages.deliveryQueue"), }, ]; return (

{t("dispatch.nav.advanced", { defaultValue: "Related tools" })}

{tools.map(({ to, icon: Icon, title }) => ( {title} ))}
); } export function meta() { return [{ title: "Operations — Dispatch" }]; } export default function OperationsRoute() { const t = useT(); const [searchParams, setSearchParams] = useSearchParams(); const view = selectedView(searchParams.get("view")); function setView(nextView: OperationsView) { const next = new URLSearchParams(searchParams); if (nextView === "monitoring") next.delete("view"); else next.set("view", nextView); setSearchParams(next, { replace: true }); } return ( { if (value === "monitoring" || value === "database") setView(value); }} className="flex min-w-0 flex-col gap-5" > {t("dispatch.pages.monitoring")} {t("dispatch.pages.database")}
); }