Commit 2796b6d
feat(studio): datasource managed through the metadata-admin engine, not a bespoke page (#1846)
datasource is a metadata type, so it should be administered by the generic
metadata-admin engine like every other type — not a hand-written System page.
- Register `datasource` as a metadata-admin resource (registry) with a custom
ListPage that ports the full manager (list / create / edit / delete / test /
sync objects). It's a *side-effectful* type (secret encryption + connection
pool + introspection), so writes go through the framework `datasource-admin`
REST (`/api/v1/datasources/*`), but it now lives inside the engine: engine
route (`…/component/metadata/resource?type=datasource`), registry slot, shell.
Form uses the engine's `useMetadataClient`; sync creates objects via it.
- Delete the standalone `DatasourceManagerPage` + `system/datasources` route.
- Add a "Datasources" item to the console admin nav + repoint the System hub
card to the engine route.
- Fix MetadataRedirect/ObjectRedirect: they left a stray `system/` segment so
`system/metadata/:type` 404'd — also repairs the existing "Object Manager" link.
Verified live (showcase + setup apps): list, create (eng_demo), and sync
(customers/orders → real object metadata) all work through the engine route.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent e4afa84 commit 2796b6d
8 files changed
Lines changed: 637 additions & 223 deletions
File tree
- apps/console/src
- pages/system
- packages/app-shell/src
- layout
- views/metadata-admin
- datasource
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
0 commit comments