swarm-ui: add a jobs tab, and type JobqGraph as real TypeScript
New /jobs route in swarm-ui, reusing the shared JobqGraph component against swarm-controller's own GET /api/jobq/graph (same wire shape hive-c0re's dashboard already consumes, different endpoint, no fork). Converted JobqGraph.jsx to JobqGraph.tsx with real prop/wire types (mirrors hive_jobq_wire's GraphNode/GraphDep/State by hand) instead of a hand-maintained ambient .d.ts at the swarm-ui consumer side — the .d.ts would duplicate the prop list and drift from the source the moment the component's signature changes without the declaration being touched. Both dashboard (untyped consumer, esbuild strips types) and swarm-ui (tsc --noEmit) build/typecheck clean off the one file.
This commit is contained in:
parent
61977514c6
commit
527ed8f3e2
6 changed files with 134 additions and 31 deletions
|
|
@ -28,7 +28,7 @@
|
|||
"./hive-menu.js": "./src/hive-menu/hive-menu.js",
|
||||
"./hive-warn.js": "./src/hive-warn/hive-warn.js",
|
||||
"./side-panel.js": "./src/side-panel/hive-side-panel.js",
|
||||
"./jobq-graph.js": "./src/jobq-graph/JobqGraph.jsx",
|
||||
"./jobq-graph.js": "./src/jobq-graph/JobqGraph.tsx",
|
||||
"./jobq-graph.css": "./src/jobq-graph/jobq-graph.css"
|
||||
},
|
||||
"files": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue