diff --git a/src/components/StatusDashboard/current_migrations.jsx b/src/components/StatusDashboard/current_migrations.jsx index 89d8158f2f..f4e8618eea 100644 --- a/src/components/StatusDashboard/current_migrations.jsx +++ b/src/components/StatusDashboard/current_migrations.jsx @@ -8,7 +8,7 @@ import Link from "@docusaurus/Link"; const COLLAPSED_KEY = "migration-collapsed"; const SORT_KEY = "migration-sort"; -export default function CurrentMigrations({ onLoad }) { +export default function CurrentMigrations({ onLoad, collapsed, name, rows, sort }) { const [state, setState] = useState({ closed: [], collapsed: { closed: true, longterm: true, regular: true }, @@ -49,6 +49,7 @@ export default function CurrentMigrations({ onLoad }) { } return { ...prev, collapsed: updated }; }); + useEffect(fetchContent(onLoad, setState), []); const { closed, longterm, regular } = state; const total = closed.length + longterm.length + regular.length; @@ -62,6 +63,61 @@ export default function CurrentMigrations({ onLoad }) {
+ + + + + + + + + + + + + + {rows.length || "…"} - - - - - - - - - - {rows.map((row) => {
resort("name")} + className={state.sort.by === "name" ? styles[state.sort.order] : undefined} + > + Name + resort("status")} + className={state.sort.by === "status" ? styles[state.sort.order] : undefined} + > + PRs made + resort("done")} + className={state.sort.by === "done" ? styles[state.sort.order] : undefined} + > + Done + resort("in-pr")} + className={state.sort.by === "in-pr" ? styles[state.sort.order] : undefined} + > + In PR + resort("awaiting-pr")} + className={state.sort.by === "awaiting-pr" ? styles[state.sort.order] : undefined} + > + Awaiting PR + resort("awaiting-parents")} + className={state.sort.by === "awaiting-parents" ? styles[state.sort.order] : undefined} + > + Awaiting parents + resort("not-solvable")} + className={state.sort.by === "not-solvable" ? styles[state.sort.order] : undefined} + > + Not solvable + resort("bot-error")} + className={state.sort.by === "bot-error" ? styles[state.sort.order] : undefined} + > + Bot error +
resort("name")} - className={sort.by === "name" ? styles[sort.order] : undefined} - > - Name - resort("status")} - className={sort.by === "status" ? styles[sort.order] : undefined} - > - PRs made - resort("done")} - className={sort.by === "done" ? styles[sort.order] : undefined} - > - Done - resort("in-pr")} - className={sort.by === "in-pr" ? styles[sort.order] : undefined} - > - In PR - resort("awaiting-pr")} - className={sort.by === "awaiting-pr" ? styles[sort.order] : undefined} - > - Awaiting PR - resort("awaiting-parents")} - className={sort.by === "awaiting-parents" ? styles[sort.order] : undefined} - > - Awaiting parents - resort("not-solvable")} - className={sort.by === "not-solvable" ? styles[sort.order] : undefined} - > - Not solvable - resort("bot-error")} - className={sort.by === "bot-error" ? styles[sort.order] : undefined} - > - Bot error -