Pick agents from a grid of their icons (running or all), type the text, send. The page posts the names and the text to the controller and shows what happened to each agent, with a retry that selects just the ones that failed. The selection rules and the controller's answer are read by plain functions with tests.
51 lines
2 KiB
TypeScript
51 lines
2 KiB
TypeScript
// Root shell component — routing only. Each route's content is its own
|
|
// page component under `./pages/`; this file just maps paths to them.
|
|
import { Route, Switch } from "wouter-preact";
|
|
import { Shell } from "./shell/Shell.js";
|
|
import { AgentsPage } from "./pages/agents/AgentsPage.js";
|
|
import { AgentTerminalPage } from "./pages/agents/AgentTerminalPage.js";
|
|
import { AlertsPage } from "./pages/AlertsPage.js";
|
|
import { BuildsPage } from "./pages/builds/BuildsPage.js";
|
|
import { BroadcastPage } from "./pages/broadcast/BroadcastPage.js";
|
|
import { ComponentsPage } from "./pages/ComponentsPage.js";
|
|
import { JobsPage } from "./pages/JobsPage.js";
|
|
import { HivesPage } from "./pages/HivesPage.js";
|
|
import { IssueReportPage } from "./pages/IssueReportPage.js";
|
|
import { ReviewPage } from "./pages/review/ReviewPage.js";
|
|
import { SchedulesPage } from "./pages/schedules/SchedulesPage.js";
|
|
import { StartPage } from "./pages/StartPage.js";
|
|
import { Panel } from "./ui/panel/Panel.js";
|
|
|
|
function NotFound() {
|
|
return (
|
|
<Panel title="404" icon="🧭">
|
|
<p>no route here.</p>
|
|
</Panel>
|
|
);
|
|
}
|
|
|
|
export function App() {
|
|
return (
|
|
<Shell>
|
|
<Switch>
|
|
<Route path="/" component={StartPage} />
|
|
<Route path="/hives" component={HivesPage} />
|
|
<Route path="/alerts" component={AlertsPage} />
|
|
<Route path="/agents" component={AgentsPage} />
|
|
<Route path="/agents/:name/terminal" component={AgentTerminalPage} />
|
|
<Route
|
|
path="/agents/:name/subagents/:subagent/terminal"
|
|
component={AgentTerminalPage}
|
|
/>
|
|
<Route path="/jobs" component={JobsPage} />
|
|
<Route path="/schedules" component={SchedulesPage} />
|
|
<Route path="/builds" component={BuildsPage} />
|
|
<Route path="/broadcast" component={BroadcastPage} />
|
|
<Route path="/issues" component={IssueReportPage} />
|
|
<Route path="/review" component={ReviewPage} />
|
|
<Route path="/components" component={ComponentsPage} />
|
|
<Route component={NotFound} />
|
|
</Switch>
|
|
</Shell>
|
|
);
|
|
}
|