swarm-ui: builds are a card under the job graph on the jobs tab
The builds tab is gone from the nav; its card sits below the jobs card on /jobs. The swarm-builder commit status now links to /jobs?run=<id>, and the old /builds address redirects there with its query so links already on PRs still open the build. Docs and the link test follow.
This commit is contained in:
parent
31670da795
commit
a2f000bab4
1 changed files with 64 additions and 21 deletions
|
|
@ -1,12 +1,12 @@
|
|||
// 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, Router, Switch } from "wouter-preact";
|
||||
import { Redirect, Route, Router, Switch, useSearch } from "wouter-preact";
|
||||
import { jobsHref } from "./pages/builds/builds-types.js";
|
||||
import { Shell } from "./shell/Shell.js";
|
||||
import { useGuardedLocation } from "./shell/useGuardedLocation.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 { MessagesPage } from "./pages/messages/MessagesPage.js";
|
||||
import { NEW_FLOW_PATH } from "./pages/notifications/FlowDraft.js";
|
||||
import { FlowEditorPage } from "./pages/notifications/FlowEditorPage.js";
|
||||
|
|
@ -19,6 +19,13 @@ import { SchedulesPage } from "./pages/schedules/SchedulesPage.js";
|
|||
import { StartPage } from "./pages/StartPage.js";
|
||||
import { Panel } from "./ui/panel/Panel.js";
|
||||
|
||||
// The builds page moved onto the jobs tab. Links made before that, such as the
|
||||
// Details link on a swarm-builder commit status, land here and go on to the
|
||||
// same build's card, query kept.
|
||||
function BuildsMoved() {
|
||||
return <Redirect to={jobsHref(useSearch())} replace />;
|
||||
}
|
||||
|
||||
function NotFound() {
|
||||
return (
|
||||
<Panel title="404" icon="🧭">
|
||||
|
|
@ -42,7 +49,7 @@ export function App() {
|
|||
/>
|
||||
<Route path="/jobs" component={JobsPage} />
|
||||
<Route path="/schedules" component={SchedulesPage} />
|
||||
<Route path="/builds" component={BuildsPage} />
|
||||
<Route path="/builds" component={BuildsMoved} />
|
||||
<Route path="/messages" component={MessagesPage} />
|
||||
<Route path="/notifications" component={NotificationsPage} />
|
||||
<Route path={NEW_FLOW_PATH}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue