Commit ce268a6
feat(metadata-admin): provenance badges + navigation fix
Surface the two-tier model on the metadata list:
- Derive 'artifact' vs 'runtime' from item._packageId (sentinel
'sys_metadata' counted as runtime); honor server-provided 'source'
field when present
- Render colored badges: sky-blue '代码包/Artifact' (with packageId
tooltip), emerald 'runtime/运行时' — replacing the always-'—' cell
- Wire the source filter dropdown to actually filter rows; counts
reflect the new two-bucket model
- Add i18n keys engine.list.source.{artifact,runtime,*Desc} in EN+ZH
Fix relative navigation: navigate('../foo') was resolved against the
matched route pattern rather than the current pathname, dropping the
':type' segment (e.g. /metadata/hook/new → /metadata/new). Pass
{ relative: 'path' } on all four call sites in ResourceEditPage so
save/cancel/history/reset/create-from-locked-banner all land on the
correct URL within the type.
Browser-verified on hook:
- both badges render with correct colors and Chinese labels
- source filter narrows count + filtered count correctly
- '新建' on artifact detail page now goes to /metadata/hook/new
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 430981d commit ce268a6
3 files changed
Lines changed: 57 additions & 28 deletions
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | | - | |
| 654 | + | |
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| |||
Lines changed: 45 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
55 | 76 | | |
56 | 77 | | |
57 | 78 | | |
| |||
95 | 116 | | |
96 | 117 | | |
97 | 118 | | |
98 | | - | |
| 119 | + | |
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
| |||
115 | 136 | | |
116 | 137 | | |
117 | 138 | | |
118 | | - | |
| 139 | + | |
119 | 140 | | |
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
124 | | - | |
| 145 | + | |
125 | 146 | | |
126 | | - | |
| 147 | + | |
127 | 148 | | |
128 | 149 | | |
129 | 150 | | |
| |||
187 | 208 | | |
188 | 209 | | |
189 | 210 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 211 | + | |
| 212 | + | |
193 | 213 | | |
194 | 214 | | |
195 | 215 | | |
| |||
260 | 280 | | |
261 | 281 | | |
262 | 282 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
278 | 299 | | |
279 | 300 | | |
280 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
261 | 269 | | |
262 | 270 | | |
263 | 271 | | |
| |||
0 commit comments