@pactor-app/skills 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/package.json +26 -0
  4. package/pactor/SKILL.md +373 -0
  5. package/pactor/references/dsl-authoring.md +448 -0
  6. package/prd-to-app/SKILL.md +75 -0
  7. package/prd-to-app/references/acceptance-checklist.md +47 -0
  8. package/prd-to-app/references/component-mapping.md +41 -0
  9. package/prd-to-app/references/mock-data-routes.md +66 -0
  10. package/prd-to-app/references/page-templates.md +274 -0
  11. package/prd-to-app/references/project-structure.md +89 -0
  12. package/prd-to-app/references/theme-and-style.md +41 -0
  13. package/prd-to-app/template/README.md +26 -0
  14. package/prd-to-app/template/app/[[...slug]]/page.tsx +7 -0
  15. package/prd-to-app/template/app/api/auth/login/route.ts +32 -0
  16. package/prd-to-app/template/app/api/auth/logout/route.ts +22 -0
  17. package/prd-to-app/template/app/api/data/[...parts]/route.ts +118 -0
  18. package/prd-to-app/template/app/api/public/pages/[id]/route.ts +40 -0
  19. package/prd-to-app/template/app/api/sitemap/route.ts +21 -0
  20. package/prd-to-app/template/app/api/users/route.ts +57 -0
  21. package/prd-to-app/template/app/favicon.ico +0 -0
  22. package/prd-to-app/template/app/globals.css +248 -0
  23. package/prd-to-app/template/app/layout.tsx +49 -0
  24. package/prd-to-app/template/app/login.css +122 -0
  25. package/prd-to-app/template/eslint.config.mjs +18 -0
  26. package/prd-to-app/template/next-env.d.ts +7 -0
  27. package/prd-to-app/template/next.config.js +32 -0
  28. package/prd-to-app/template/package.json +34 -0
  29. package/prd-to-app/template/pnpm-lock.yaml +6854 -0
  30. package/prd-to-app/template/pnpm-workspace.yaml +7 -0
  31. package/prd-to-app/template/postcss.config.mjs +7 -0
  32. package/prd-to-app/template/public/file.svg +1 -0
  33. package/prd-to-app/template/public/globe.svg +1 -0
  34. package/prd-to-app/template/public/next.svg +1 -0
  35. package/prd-to-app/template/public/skins/chenwunaifu.css +111 -0
  36. package/prd-to-app/template/public/skins/taijingshenlin.css +109 -0
  37. package/prd-to-app/template/public/skins/xuanzhimoyun.css +110 -0
  38. package/prd-to-app/template/public/vercel.svg +1 -0
  39. package/prd-to-app/template/public/window.svg +1 -0
  40. package/prd-to-app/template/scripts/build.mjs +35 -0
  41. package/prd-to-app/template/src/pactor/App.tsx +55 -0
  42. package/prd-to-app/template/src/pactor/actions.ts +438 -0
  43. package/prd-to-app/template/src/pactor/components/card-links.tsx +86 -0
  44. package/prd-to-app/template/src/pactor/components/chip-filter.tsx +89 -0
  45. package/prd-to-app/template/src/pactor/components/chip-node.tsx +46 -0
  46. package/prd-to-app/template/src/pactor/components/debug-chat.tsx +189 -0
  47. package/prd-to-app/template/src/pactor/components/index.ts +28 -0
  48. package/prd-to-app/template/src/pactor/components/log-status.tsx +64 -0
  49. package/prd-to-app/template/src/pactor/components/status-badge.tsx +46 -0
  50. package/prd-to-app/template/src/pactor/components/theme-switcher.tsx +136 -0
  51. package/prd-to-app/template/src/pactor/config.ts +28 -0
  52. package/prd-to-app/template/src/pactor/mocks/audit-mock.ts +403 -0
  53. package/prd-to-app/template/src/pactor/mocks/call-logs-mock.ts +875 -0
  54. package/prd-to-app/template/src/pactor/mocks/client-debug-mock.ts +188 -0
  55. package/prd-to-app/template/src/pactor/mocks/client-templates-mock.ts +497 -0
  56. package/prd-to-app/template/src/pactor/mocks/clients-mock.ts +483 -0
  57. package/prd-to-app/template/src/pactor/mocks/costs-mock.ts +406 -0
  58. package/prd-to-app/template/src/pactor/mocks/dashboard-mock.ts +192 -0
  59. package/prd-to-app/template/src/pactor/mocks/model-debug-mock.ts +144 -0
  60. package/prd-to-app/template/src/pactor/mocks/models-mock.ts +799 -0
  61. package/prd-to-app/template/src/pactor/mocks/ops-usage-mock.ts +806 -0
  62. package/prd-to-app/template/src/pactor/mocks/providers-mock.ts +424 -0
  63. package/prd-to-app/template/src/pactor/mocks/routes-mock.ts +604 -0
  64. package/prd-to-app/template/src/pactor/services.ts +185 -0
  65. package/prd-to-app/template/src/pactor/skin.ts +52 -0
  66. package/prd-to-app/template/src/server/accounts.ts +63 -0
  67. package/prd-to-app/template/src/server/cors.ts +34 -0
  68. package/prd-to-app/template/src/server/sitemap.ts +176 -0
  69. package/prd-to-app/template/src/server/yaml/common/dashboard.yaml +498 -0
  70. package/prd-to-app/template/src/server/yaml/common/login.yaml +84 -0
  71. package/prd-to-app/template/src/server/yaml/provider/provider-create.yaml +340 -0
  72. package/prd-to-app/template/src/server/yaml/provider/provider-detail.yaml +780 -0
  73. package/prd-to-app/template/src/server/yaml/provider/provider-edit.yaml +366 -0
  74. package/prd-to-app/template/src/server/yaml/provider/provider-list.yaml +1989 -0
  75. package/prd-to-app/template/src/server/yaml/route/route-create.yaml +511 -0
  76. package/prd-to-app/template/src/server/yaml/route/route-detail.yaml +610 -0
  77. package/prd-to-app/template/src/server/yaml/route/route-edit.yaml +809 -0
  78. package/prd-to-app/template/src/server/yaml/route/route-list.yaml +1793 -0
  79. package/prd-to-app/template/src/server/yaml/sitemap.yaml +250 -0
  80. package/prd-to-app/template/tsconfig.json +34 -0
@@ -0,0 +1,1793 @@
1
+ dsl: "1.0"
2
+ page:
3
+ id: route-list
4
+ title: 路由
5
+ name: routeList
6
+ description: 模型路由 / 路由:对外请求路径、协议与模型调度策略(卡片式列表)
7
+ state:
8
+ statusChip: all
9
+ typeChip: all
10
+ tagChips: []
11
+ dataSources:
12
+ routes:
13
+ type: http
14
+ autoLoad: true
15
+ request:
16
+ method: GET
17
+ url: /api/data/routes
18
+ params:
19
+ status: ${state.statusChip}
20
+ type: ${state.typeChip}
21
+ tags: ${state.tagChips}
22
+ body:
23
+ type: Page
24
+ children:
25
+ - type: Breadcrumb
26
+ props:
27
+ items:
28
+ - label: 模型路由
29
+ - label: 路由
30
+ - type: Flex
31
+ props:
32
+ align: baseline
33
+ gap: middle
34
+ children:
35
+ - type: Typography
36
+ props:
37
+ variant: h3
38
+ text: 路由
39
+ - type: Typography
40
+ props:
41
+ variant: muted
42
+ text: 定义对外请求路径、协议与模型调度策略。
43
+ - type: Card
44
+ children:
45
+ - type: Flex
46
+ props:
47
+ align: center
48
+ gap: small
49
+ style:
50
+ flexWrap: wrap
51
+ children:
52
+ - type: Text
53
+ props:
54
+ text: 状态
55
+ strong: true
56
+ className: w-10
57
+ - type: ChipFilter
58
+ props:
59
+ mode: single
60
+ value: ${state.statusChip}
61
+ items: ${data.routes.filters.status}
62
+ events:
63
+ onChange:
64
+ - action: setState
65
+ params:
66
+ statusChip: ${event}
67
+ - action: reload
68
+ params:
69
+ dataSource: routes
70
+ - type: Flex
71
+ props:
72
+ align: center
73
+ gap: small
74
+ style:
75
+ flexWrap: wrap
76
+ className: mt-2
77
+ children:
78
+ - type: Text
79
+ props:
80
+ text: 类型
81
+ strong: true
82
+ className: w-10
83
+ - type: ChipFilter
84
+ props:
85
+ mode: single
86
+ value: ${state.typeChip}
87
+ items: ${data.routes.filters.type}
88
+ events:
89
+ onChange:
90
+ - action: setState
91
+ params:
92
+ typeChip: ${event}
93
+ - action: reload
94
+ params:
95
+ dataSource: routes
96
+ - type: Flex
97
+ props:
98
+ align: center
99
+ gap: small
100
+ style:
101
+ flexWrap: wrap
102
+ className: mt-2
103
+ children:
104
+ - type: Text
105
+ props:
106
+ text: 标签
107
+ strong: true
108
+ className: w-10
109
+ - type: ChipFilter
110
+ props:
111
+ mode: multi
112
+ value: ${state.tagChips}
113
+ items: ${data.routes.filters.tags}
114
+ events:
115
+ onChange:
116
+ - action: setState
117
+ params:
118
+ tagChips: ${event}
119
+ - action: reload
120
+ params:
121
+ dataSource: routes
122
+ - type: Grid
123
+ props:
124
+ columns: 3
125
+ gap: 16
126
+ children:
127
+ - type: Card
128
+ props:
129
+ className: border-dashed h-full bg-(--muted) border-2
130
+ border-[color-mix(in_srgb,var(--foreground)_30%,transparent)]
131
+ [&_[data-slot=card-content]]:h-full
132
+ children:
133
+ - type: Flex
134
+ props:
135
+ direction: vertical
136
+ gap: large
137
+ align: stretch
138
+ justify: space-between
139
+ className: h-full
140
+ children:
141
+ - type: Flex
142
+ props:
143
+ align: center
144
+ gap: middle
145
+ children:
146
+ - type: Flex
147
+ props:
148
+ align: center
149
+ justify: center
150
+ className: size-10 shrink-0 rounded-full bg-primary
151
+ children:
152
+ - type: Icon
153
+ props:
154
+ name: plus
155
+ size: 28
156
+ color: var(--primary-foreground)
157
+ - type: Flex
158
+ props:
159
+ direction: vertical
160
+ gap: 2
161
+ children:
162
+ - type: Text
163
+ props:
164
+ text: 新建路由
165
+ strong: true
166
+ className: text-base
167
+ - type: Text
168
+ props:
169
+ text: 在单一页面完成入口与调度策略配置
170
+ type: secondary
171
+ className: text-sm
172
+ - type: Flex
173
+ props:
174
+ align: center
175
+ gap: middle
176
+ children:
177
+ - type: Button
178
+ props:
179
+ text: 新建路由
180
+ icon: plus
181
+ variant: primary
182
+ style:
183
+ flex: 1
184
+ events:
185
+ onClick:
186
+ - action: navigate
187
+ params:
188
+ to: /routes/new
189
+ - type: RouteCardLink
190
+ when: ${data.routes.items[0] != null}
191
+ props:
192
+ href: /routes/${data.routes.items[0].code}
193
+ children:
194
+ - type: Card
195
+ props:
196
+ className: h-full model-card relative
197
+ children:
198
+ - type: Flex
199
+ props:
200
+ align: center
201
+ gap: middle
202
+ children:
203
+ - type: Badge
204
+ props:
205
+ text: ${data.routes.items[0].typeLabel}
206
+ variant: outline
207
+ - type: Flex
208
+ props:
209
+ direction: vertical
210
+ gap: 0
211
+ style:
212
+ alignItems: flex-start
213
+ children:
214
+ - type: Button
215
+ props:
216
+ text: ${data.routes.items[0].name}
217
+ variant: link
218
+ className: p-0 font-semibold text-base
219
+ events:
220
+ onClick:
221
+ - action: navigate
222
+ params:
223
+ to: /routes/${data.routes.items[0].code}
224
+ - type: Text
225
+ props:
226
+ text: ${data.routes.items[0].code}
227
+ type: secondary
228
+ className: text-sm
229
+ - type: Badge
230
+ when: ${data.routes.items[0].status == 'draft'}
231
+ props:
232
+ text: 草稿
233
+ variant: secondary
234
+ - type: Flex
235
+ props:
236
+ align: center
237
+ gap: 2
238
+ className: absolute right-3 top-3 model-card-actions
239
+ children:
240
+ - type: Tooltip
241
+ props:
242
+ content: "${data.routes.items[0].status == 'enabled' ? '停用' : '启用'}"
243
+ children:
244
+ - type: Button
245
+ props:
246
+ variant: text
247
+ size: small
248
+ className: size-6 p-0
249
+ children:
250
+ - type: StatusToggleIcon
251
+ props:
252
+ enabled: ${data.routes.items[0].status == 'enabled'}
253
+ events:
254
+ onClick:
255
+ - id: statusCfm
256
+ action: overlay.open
257
+ params:
258
+ overlay:
259
+ type: modal
260
+ title: "${data.routes.items[0].status == 'enabled' ? '确认停用 Route' : '确认启用
261
+ Route'}"
262
+ width: 480
263
+ content:
264
+ type: Flex
265
+ props:
266
+ direction: vertical
267
+ gap: middle
268
+ children:
269
+ - type: Text
270
+ props:
271
+ size: small
272
+ text: "${data.routes.items[0].status == 'enabled' ? '停用后,Runtime
273
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
274
+ '启用后,Runtime
275
+ 将按入口配置与路由策略匹配并调度该路由。'}"
276
+ - type: Flex
277
+ props:
278
+ direction: vertical
279
+ gap: small
280
+ children:
281
+ - type: Text
282
+ props:
283
+ text: 影响范围:
284
+ strong: true
285
+ - type: Text
286
+ props:
287
+ text: · 关联模型:${data.routes.items[0].models.length} 个(启用
288
+ ${data.routes.items[0].enabledModelCount}
289
+ 个)
290
+ type: secondary
291
+ - type: Text
292
+ props:
293
+ text: · 请求入口:${data.routes.items[0].path} · ${data.routes.items[0].protocol}
294
+ type: secondary
295
+ - type: Text
296
+ when: ${data.routes.items[0].status == 'enabled' &&
297
+ data.routes.items[0].enabledModelCount
298
+ > 0}
299
+ props:
300
+ size: small
301
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
302
+ type: warning
303
+ - type: Flex
304
+ props:
305
+ justify: end
306
+ gap: middle
307
+ children:
308
+ - type: Button
309
+ props:
310
+ text: 取消
311
+ events:
312
+ onClick:
313
+ - action: overlay.close
314
+ - type: Button
315
+ props:
316
+ text: "${data.routes.items[0].status == 'enabled' ? '确认停用' : '确认启用'}"
317
+ variant: primary
318
+ danger: ${data.routes.items[0].status == 'enabled'}
319
+ events:
320
+ onClick:
321
+ - action: overlay.close
322
+ params:
323
+ payload:
324
+ ok: true
325
+ - action: if
326
+ params:
327
+ condition: ${actions.statusCfm.ok}
328
+ then:
329
+ - action: message
330
+ params:
331
+ messageType: success
332
+ text: "${data.routes.items[0].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
333
+ - type: Tooltip
334
+ props:
335
+ content: 编辑
336
+ children:
337
+ - type: Button
338
+ props:
339
+ icon: pencil
340
+ variant: text
341
+ size: small
342
+ className: size-6 p-0
343
+ events:
344
+ onClick:
345
+ - action: navigate
346
+ params:
347
+ to: /routes/${data.routes.items[0].code}/edit
348
+ - type: Text
349
+ props:
350
+ text: ${data.routes.items[0].entrySummary}
351
+ type: secondary
352
+ - type: Flex
353
+ props:
354
+ align: center
355
+ gap: small
356
+ style:
357
+ flexWrap: wrap
358
+ children:
359
+ - type: Badge
360
+ when: ${data.routes.items[0].tags[0] != null}
361
+ props:
362
+ text: ${data.routes.items[0].tags[0]}
363
+ variant: outline
364
+ - type: Badge
365
+ when: ${data.routes.items[0].tags[1] != null}
366
+ props:
367
+ text: ${data.routes.items[0].tags[1]}
368
+ variant: outline
369
+ - type: Badge
370
+ when: ${data.routes.items[0].tags[2] != null}
371
+ props:
372
+ text: ${data.routes.items[0].tags[2]}
373
+ variant: outline
374
+ - type: Badge
375
+ when: ${data.routes.items[0].tags[3] != null}
376
+ props:
377
+ text: ${data.routes.items[0].tags[3]}
378
+ variant: outline
379
+ - type: Text
380
+ when: ${data.routes.items[0].tags.length == 0}
381
+ props:
382
+ text: —
383
+ type: secondary
384
+ - type: Text
385
+ props:
386
+ text: ${data.routes.items[0].policySummary}
387
+ type: secondary
388
+ className: text-sm
389
+ - type: RouteCardLink
390
+ when: ${data.routes.items[1] != null}
391
+ props:
392
+ href: /routes/${data.routes.items[1].code}
393
+ children:
394
+ - type: Card
395
+ props:
396
+ className: h-full model-card relative
397
+ children:
398
+ - type: Flex
399
+ props:
400
+ align: center
401
+ gap: middle
402
+ children:
403
+ - type: Badge
404
+ props:
405
+ text: ${data.routes.items[1].typeLabel}
406
+ variant: outline
407
+ - type: Flex
408
+ props:
409
+ direction: vertical
410
+ gap: 0
411
+ style:
412
+ alignItems: flex-start
413
+ children:
414
+ - type: Button
415
+ props:
416
+ text: ${data.routes.items[1].name}
417
+ variant: link
418
+ className: p-0 font-semibold text-base
419
+ events:
420
+ onClick:
421
+ - action: navigate
422
+ params:
423
+ to: /routes/${data.routes.items[1].code}
424
+ - type: Text
425
+ props:
426
+ text: ${data.routes.items[1].code}
427
+ type: secondary
428
+ className: text-sm
429
+ - type: Badge
430
+ when: ${data.routes.items[1].status == 'draft'}
431
+ props:
432
+ text: 草稿
433
+ variant: secondary
434
+ - type: Flex
435
+ props:
436
+ align: center
437
+ gap: 2
438
+ className: absolute right-3 top-3 model-card-actions
439
+ children:
440
+ - type: Tooltip
441
+ props:
442
+ content: "${data.routes.items[1].status == 'enabled' ? '停用' : '启用'}"
443
+ children:
444
+ - type: Button
445
+ props:
446
+ variant: text
447
+ size: small
448
+ className: size-6 p-0
449
+ children:
450
+ - type: StatusToggleIcon
451
+ props:
452
+ enabled: ${data.routes.items[1].status == 'enabled'}
453
+ events:
454
+ onClick:
455
+ - id: statusCfm
456
+ action: overlay.open
457
+ params:
458
+ overlay:
459
+ type: modal
460
+ title: "${data.routes.items[1].status == 'enabled' ? '确认停用 Route' : '确认启用
461
+ Route'}"
462
+ width: 480
463
+ content:
464
+ type: Flex
465
+ props:
466
+ direction: vertical
467
+ gap: middle
468
+ children:
469
+ - type: Text
470
+ props:
471
+ size: small
472
+ text: "${data.routes.items[1].status == 'enabled' ? '停用后,Runtime
473
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
474
+ '启用后,Runtime
475
+ 将按入口配置与路由策略匹配并调度该路由。'}"
476
+ - type: Flex
477
+ props:
478
+ direction: vertical
479
+ gap: small
480
+ children:
481
+ - type: Text
482
+ props:
483
+ text: 影响范围:
484
+ strong: true
485
+ - type: Text
486
+ props:
487
+ text: · 关联模型:${data.routes.items[1].models.length} 个(启用
488
+ ${data.routes.items[1].enabledModelCount}
489
+ 个)
490
+ type: secondary
491
+ - type: Text
492
+ props:
493
+ text: · 请求入口:${data.routes.items[1].path} · ${data.routes.items[1].protocol}
494
+ type: secondary
495
+ - type: Text
496
+ when: ${data.routes.items[1].status == 'enabled' &&
497
+ data.routes.items[1].enabledModelCount
498
+ > 0}
499
+ props:
500
+ size: small
501
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
502
+ type: warning
503
+ - type: Flex
504
+ props:
505
+ justify: end
506
+ gap: middle
507
+ children:
508
+ - type: Button
509
+ props:
510
+ text: 取消
511
+ events:
512
+ onClick:
513
+ - action: overlay.close
514
+ - type: Button
515
+ props:
516
+ text: "${data.routes.items[1].status == 'enabled' ? '确认停用' : '确认启用'}"
517
+ variant: primary
518
+ danger: ${data.routes.items[1].status == 'enabled'}
519
+ events:
520
+ onClick:
521
+ - action: overlay.close
522
+ params:
523
+ payload:
524
+ ok: true
525
+ - action: if
526
+ params:
527
+ condition: ${actions.statusCfm.ok}
528
+ then:
529
+ - action: message
530
+ params:
531
+ messageType: success
532
+ text: "${data.routes.items[1].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
533
+ - type: Tooltip
534
+ props:
535
+ content: 编辑
536
+ children:
537
+ - type: Button
538
+ props:
539
+ icon: pencil
540
+ variant: text
541
+ size: small
542
+ className: size-6 p-0
543
+ events:
544
+ onClick:
545
+ - action: navigate
546
+ params:
547
+ to: /routes/${data.routes.items[1].code}/edit
548
+ - type: Text
549
+ props:
550
+ text: ${data.routes.items[1].entrySummary}
551
+ type: secondary
552
+ - type: Flex
553
+ props:
554
+ align: center
555
+ gap: small
556
+ style:
557
+ flexWrap: wrap
558
+ children:
559
+ - type: Badge
560
+ when: ${data.routes.items[1].tags[0] != null}
561
+ props:
562
+ text: ${data.routes.items[1].tags[0]}
563
+ variant: outline
564
+ - type: Badge
565
+ when: ${data.routes.items[1].tags[1] != null}
566
+ props:
567
+ text: ${data.routes.items[1].tags[1]}
568
+ variant: outline
569
+ - type: Badge
570
+ when: ${data.routes.items[1].tags[2] != null}
571
+ props:
572
+ text: ${data.routes.items[1].tags[2]}
573
+ variant: outline
574
+ - type: Badge
575
+ when: ${data.routes.items[1].tags[3] != null}
576
+ props:
577
+ text: ${data.routes.items[1].tags[3]}
578
+ variant: outline
579
+ - type: Text
580
+ when: ${data.routes.items[1].tags.length == 0}
581
+ props:
582
+ text: —
583
+ type: secondary
584
+ - type: Text
585
+ props:
586
+ text: ${data.routes.items[1].policySummary}
587
+ type: secondary
588
+ className: text-sm
589
+ - type: RouteCardLink
590
+ when: ${data.routes.items[2] != null}
591
+ props:
592
+ href: /routes/${data.routes.items[2].code}
593
+ children:
594
+ - type: Card
595
+ props:
596
+ className: h-full model-card relative
597
+ children:
598
+ - type: Flex
599
+ props:
600
+ align: center
601
+ gap: middle
602
+ children:
603
+ - type: Badge
604
+ props:
605
+ text: ${data.routes.items[2].typeLabel}
606
+ variant: outline
607
+ - type: Flex
608
+ props:
609
+ direction: vertical
610
+ gap: 0
611
+ style:
612
+ alignItems: flex-start
613
+ children:
614
+ - type: Button
615
+ props:
616
+ text: ${data.routes.items[2].name}
617
+ variant: link
618
+ className: p-0 font-semibold text-base
619
+ events:
620
+ onClick:
621
+ - action: navigate
622
+ params:
623
+ to: /routes/${data.routes.items[2].code}
624
+ - type: Text
625
+ props:
626
+ text: ${data.routes.items[2].code}
627
+ type: secondary
628
+ className: text-sm
629
+ - type: Badge
630
+ when: ${data.routes.items[2].status == 'draft'}
631
+ props:
632
+ text: 草稿
633
+ variant: secondary
634
+ - type: Flex
635
+ props:
636
+ align: center
637
+ gap: 2
638
+ className: absolute right-3 top-3 model-card-actions
639
+ children:
640
+ - type: Tooltip
641
+ props:
642
+ content: "${data.routes.items[2].status == 'enabled' ? '停用' : '启用'}"
643
+ children:
644
+ - type: Button
645
+ props:
646
+ variant: text
647
+ size: small
648
+ className: size-6 p-0
649
+ children:
650
+ - type: StatusToggleIcon
651
+ props:
652
+ enabled: ${data.routes.items[2].status == 'enabled'}
653
+ events:
654
+ onClick:
655
+ - id: statusCfm
656
+ action: overlay.open
657
+ params:
658
+ overlay:
659
+ type: modal
660
+ title: "${data.routes.items[2].status == 'enabled' ? '确认停用 Route' : '确认启用
661
+ Route'}"
662
+ width: 480
663
+ content:
664
+ type: Flex
665
+ props:
666
+ direction: vertical
667
+ gap: middle
668
+ children:
669
+ - type: Text
670
+ props:
671
+ size: small
672
+ text: "${data.routes.items[2].status == 'enabled' ? '停用后,Runtime
673
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
674
+ '启用后,Runtime
675
+ 将按入口配置与路由策略匹配并调度该路由。'}"
676
+ - type: Flex
677
+ props:
678
+ direction: vertical
679
+ gap: small
680
+ children:
681
+ - type: Text
682
+ props:
683
+ text: 影响范围:
684
+ strong: true
685
+ - type: Text
686
+ props:
687
+ text: · 关联模型:${data.routes.items[2].models.length} 个(启用
688
+ ${data.routes.items[2].enabledModelCount}
689
+ 个)
690
+ type: secondary
691
+ - type: Text
692
+ props:
693
+ text: · 请求入口:${data.routes.items[2].path} · ${data.routes.items[2].protocol}
694
+ type: secondary
695
+ - type: Text
696
+ when: ${data.routes.items[2].status == 'enabled' &&
697
+ data.routes.items[2].enabledModelCount
698
+ > 0}
699
+ props:
700
+ size: small
701
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
702
+ type: warning
703
+ - type: Flex
704
+ props:
705
+ justify: end
706
+ gap: middle
707
+ children:
708
+ - type: Button
709
+ props:
710
+ text: 取消
711
+ events:
712
+ onClick:
713
+ - action: overlay.close
714
+ - type: Button
715
+ props:
716
+ text: "${data.routes.items[2].status == 'enabled' ? '确认停用' : '确认启用'}"
717
+ variant: primary
718
+ danger: ${data.routes.items[2].status == 'enabled'}
719
+ events:
720
+ onClick:
721
+ - action: overlay.close
722
+ params:
723
+ payload:
724
+ ok: true
725
+ - action: if
726
+ params:
727
+ condition: ${actions.statusCfm.ok}
728
+ then:
729
+ - action: message
730
+ params:
731
+ messageType: success
732
+ text: "${data.routes.items[2].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
733
+ - type: Tooltip
734
+ props:
735
+ content: 编辑
736
+ children:
737
+ - type: Button
738
+ props:
739
+ icon: pencil
740
+ variant: text
741
+ size: small
742
+ className: size-6 p-0
743
+ events:
744
+ onClick:
745
+ - action: navigate
746
+ params:
747
+ to: /routes/${data.routes.items[2].code}/edit
748
+ - type: Text
749
+ props:
750
+ text: ${data.routes.items[2].entrySummary}
751
+ type: secondary
752
+ - type: Flex
753
+ props:
754
+ align: center
755
+ gap: small
756
+ style:
757
+ flexWrap: wrap
758
+ children:
759
+ - type: Badge
760
+ when: ${data.routes.items[2].tags[0] != null}
761
+ props:
762
+ text: ${data.routes.items[2].tags[0]}
763
+ variant: outline
764
+ - type: Badge
765
+ when: ${data.routes.items[2].tags[1] != null}
766
+ props:
767
+ text: ${data.routes.items[2].tags[1]}
768
+ variant: outline
769
+ - type: Badge
770
+ when: ${data.routes.items[2].tags[2] != null}
771
+ props:
772
+ text: ${data.routes.items[2].tags[2]}
773
+ variant: outline
774
+ - type: Badge
775
+ when: ${data.routes.items[2].tags[3] != null}
776
+ props:
777
+ text: ${data.routes.items[2].tags[3]}
778
+ variant: outline
779
+ - type: Text
780
+ when: ${data.routes.items[2].tags.length == 0}
781
+ props:
782
+ text: —
783
+ type: secondary
784
+ - type: Text
785
+ props:
786
+ text: ${data.routes.items[2].policySummary}
787
+ type: secondary
788
+ className: text-sm
789
+ - type: RouteCardLink
790
+ when: ${data.routes.items[3] != null}
791
+ props:
792
+ href: /routes/${data.routes.items[3].code}
793
+ children:
794
+ - type: Card
795
+ props:
796
+ className: h-full model-card relative
797
+ children:
798
+ - type: Flex
799
+ props:
800
+ align: center
801
+ gap: middle
802
+ children:
803
+ - type: Badge
804
+ props:
805
+ text: ${data.routes.items[3].typeLabel}
806
+ variant: outline
807
+ - type: Flex
808
+ props:
809
+ direction: vertical
810
+ gap: 0
811
+ style:
812
+ alignItems: flex-start
813
+ children:
814
+ - type: Button
815
+ props:
816
+ text: ${data.routes.items[3].name}
817
+ variant: link
818
+ className: p-0 font-semibold text-base
819
+ events:
820
+ onClick:
821
+ - action: navigate
822
+ params:
823
+ to: /routes/${data.routes.items[3].code}
824
+ - type: Text
825
+ props:
826
+ text: ${data.routes.items[3].code}
827
+ type: secondary
828
+ className: text-sm
829
+ - type: Badge
830
+ when: ${data.routes.items[3].status == 'draft'}
831
+ props:
832
+ text: 草稿
833
+ variant: secondary
834
+ - type: Flex
835
+ props:
836
+ align: center
837
+ gap: 2
838
+ className: absolute right-3 top-3 model-card-actions
839
+ children:
840
+ - type: Tooltip
841
+ props:
842
+ content: "${data.routes.items[3].status == 'enabled' ? '停用' : '启用'}"
843
+ children:
844
+ - type: Button
845
+ props:
846
+ variant: text
847
+ size: small
848
+ className: size-6 p-0
849
+ children:
850
+ - type: StatusToggleIcon
851
+ props:
852
+ enabled: ${data.routes.items[3].status == 'enabled'}
853
+ events:
854
+ onClick:
855
+ - id: statusCfm
856
+ action: overlay.open
857
+ params:
858
+ overlay:
859
+ type: modal
860
+ title: "${data.routes.items[3].status == 'enabled' ? '确认停用 Route' : '确认启用
861
+ Route'}"
862
+ width: 480
863
+ content:
864
+ type: Flex
865
+ props:
866
+ direction: vertical
867
+ gap: middle
868
+ children:
869
+ - type: Text
870
+ props:
871
+ size: small
872
+ text: "${data.routes.items[3].status == 'enabled' ? '停用后,Runtime
873
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
874
+ '启用后,Runtime
875
+ 将按入口配置与路由策略匹配并调度该路由。'}"
876
+ - type: Flex
877
+ props:
878
+ direction: vertical
879
+ gap: small
880
+ children:
881
+ - type: Text
882
+ props:
883
+ text: 影响范围:
884
+ strong: true
885
+ - type: Text
886
+ props:
887
+ text: · 关联模型:${data.routes.items[3].models.length} 个(启用
888
+ ${data.routes.items[3].enabledModelCount}
889
+ 个)
890
+ type: secondary
891
+ - type: Text
892
+ props:
893
+ text: · 请求入口:${data.routes.items[3].path} · ${data.routes.items[3].protocol}
894
+ type: secondary
895
+ - type: Text
896
+ when: ${data.routes.items[3].status == 'enabled' &&
897
+ data.routes.items[3].enabledModelCount
898
+ > 0}
899
+ props:
900
+ size: small
901
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
902
+ type: warning
903
+ - type: Flex
904
+ props:
905
+ justify: end
906
+ gap: middle
907
+ children:
908
+ - type: Button
909
+ props:
910
+ text: 取消
911
+ events:
912
+ onClick:
913
+ - action: overlay.close
914
+ - type: Button
915
+ props:
916
+ text: "${data.routes.items[3].status == 'enabled' ? '确认停用' : '确认启用'}"
917
+ variant: primary
918
+ danger: ${data.routes.items[3].status == 'enabled'}
919
+ events:
920
+ onClick:
921
+ - action: overlay.close
922
+ params:
923
+ payload:
924
+ ok: true
925
+ - action: if
926
+ params:
927
+ condition: ${actions.statusCfm.ok}
928
+ then:
929
+ - action: message
930
+ params:
931
+ messageType: success
932
+ text: "${data.routes.items[3].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
933
+ - type: Tooltip
934
+ props:
935
+ content: 编辑
936
+ children:
937
+ - type: Button
938
+ props:
939
+ icon: pencil
940
+ variant: text
941
+ size: small
942
+ className: size-6 p-0
943
+ events:
944
+ onClick:
945
+ - action: navigate
946
+ params:
947
+ to: /routes/${data.routes.items[3].code}/edit
948
+ - type: Text
949
+ props:
950
+ text: ${data.routes.items[3].entrySummary}
951
+ type: secondary
952
+ - type: Flex
953
+ props:
954
+ align: center
955
+ gap: small
956
+ style:
957
+ flexWrap: wrap
958
+ children:
959
+ - type: Badge
960
+ when: ${data.routes.items[3].tags[0] != null}
961
+ props:
962
+ text: ${data.routes.items[3].tags[0]}
963
+ variant: outline
964
+ - type: Badge
965
+ when: ${data.routes.items[3].tags[1] != null}
966
+ props:
967
+ text: ${data.routes.items[3].tags[1]}
968
+ variant: outline
969
+ - type: Badge
970
+ when: ${data.routes.items[3].tags[2] != null}
971
+ props:
972
+ text: ${data.routes.items[3].tags[2]}
973
+ variant: outline
974
+ - type: Badge
975
+ when: ${data.routes.items[3].tags[3] != null}
976
+ props:
977
+ text: ${data.routes.items[3].tags[3]}
978
+ variant: outline
979
+ - type: Text
980
+ when: ${data.routes.items[3].tags.length == 0}
981
+ props:
982
+ text: —
983
+ type: secondary
984
+ - type: Text
985
+ props:
986
+ text: ${data.routes.items[3].policySummary}
987
+ type: secondary
988
+ className: text-sm
989
+ - type: RouteCardLink
990
+ when: ${data.routes.items[4] != null}
991
+ props:
992
+ href: /routes/${data.routes.items[4].code}
993
+ children:
994
+ - type: Card
995
+ props:
996
+ className: h-full model-card relative
997
+ children:
998
+ - type: Flex
999
+ props:
1000
+ align: center
1001
+ gap: middle
1002
+ children:
1003
+ - type: Badge
1004
+ props:
1005
+ text: ${data.routes.items[4].typeLabel}
1006
+ variant: outline
1007
+ - type: Flex
1008
+ props:
1009
+ direction: vertical
1010
+ gap: 0
1011
+ style:
1012
+ alignItems: flex-start
1013
+ children:
1014
+ - type: Button
1015
+ props:
1016
+ text: ${data.routes.items[4].name}
1017
+ variant: link
1018
+ className: p-0 font-semibold text-base
1019
+ events:
1020
+ onClick:
1021
+ - action: navigate
1022
+ params:
1023
+ to: /routes/${data.routes.items[4].code}
1024
+ - type: Text
1025
+ props:
1026
+ text: ${data.routes.items[4].code}
1027
+ type: secondary
1028
+ className: text-sm
1029
+ - type: Badge
1030
+ when: ${data.routes.items[4].status == 'draft'}
1031
+ props:
1032
+ text: 草稿
1033
+ variant: secondary
1034
+ - type: Flex
1035
+ props:
1036
+ align: center
1037
+ gap: 2
1038
+ className: absolute right-3 top-3 model-card-actions
1039
+ children:
1040
+ - type: Tooltip
1041
+ props:
1042
+ content: "${data.routes.items[4].status == 'enabled' ? '停用' : '启用'}"
1043
+ children:
1044
+ - type: Button
1045
+ props:
1046
+ variant: text
1047
+ size: small
1048
+ className: size-6 p-0
1049
+ children:
1050
+ - type: StatusToggleIcon
1051
+ props:
1052
+ enabled: ${data.routes.items[4].status == 'enabled'}
1053
+ events:
1054
+ onClick:
1055
+ - id: statusCfm
1056
+ action: overlay.open
1057
+ params:
1058
+ overlay:
1059
+ type: modal
1060
+ title: "${data.routes.items[4].status == 'enabled' ? '确认停用 Route' : '确认启用
1061
+ Route'}"
1062
+ width: 480
1063
+ content:
1064
+ type: Flex
1065
+ props:
1066
+ direction: vertical
1067
+ gap: middle
1068
+ children:
1069
+ - type: Text
1070
+ props:
1071
+ size: small
1072
+ text: "${data.routes.items[4].status == 'enabled' ? '停用后,Runtime
1073
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
1074
+ '启用后,Runtime
1075
+ 将按入口配置与路由策略匹配并调度该路由。'}"
1076
+ - type: Flex
1077
+ props:
1078
+ direction: vertical
1079
+ gap: small
1080
+ children:
1081
+ - type: Text
1082
+ props:
1083
+ text: 影响范围:
1084
+ strong: true
1085
+ - type: Text
1086
+ props:
1087
+ text: · 关联模型:${data.routes.items[4].models.length} 个(启用
1088
+ ${data.routes.items[4].enabledModelCount}
1089
+ 个)
1090
+ type: secondary
1091
+ - type: Text
1092
+ props:
1093
+ text: · 请求入口:${data.routes.items[4].path} · ${data.routes.items[4].protocol}
1094
+ type: secondary
1095
+ - type: Text
1096
+ when: ${data.routes.items[4].status == 'enabled' &&
1097
+ data.routes.items[4].enabledModelCount
1098
+ > 0}
1099
+ props:
1100
+ size: small
1101
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
1102
+ type: warning
1103
+ - type: Flex
1104
+ props:
1105
+ justify: end
1106
+ gap: middle
1107
+ children:
1108
+ - type: Button
1109
+ props:
1110
+ text: 取消
1111
+ events:
1112
+ onClick:
1113
+ - action: overlay.close
1114
+ - type: Button
1115
+ props:
1116
+ text: "${data.routes.items[4].status == 'enabled' ? '确认停用' : '确认启用'}"
1117
+ variant: primary
1118
+ danger: ${data.routes.items[4].status == 'enabled'}
1119
+ events:
1120
+ onClick:
1121
+ - action: overlay.close
1122
+ params:
1123
+ payload:
1124
+ ok: true
1125
+ - action: if
1126
+ params:
1127
+ condition: ${actions.statusCfm.ok}
1128
+ then:
1129
+ - action: message
1130
+ params:
1131
+ messageType: success
1132
+ text: "${data.routes.items[4].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
1133
+ - type: Tooltip
1134
+ props:
1135
+ content: 编辑
1136
+ children:
1137
+ - type: Button
1138
+ props:
1139
+ icon: pencil
1140
+ variant: text
1141
+ size: small
1142
+ className: size-6 p-0
1143
+ events:
1144
+ onClick:
1145
+ - action: navigate
1146
+ params:
1147
+ to: /routes/${data.routes.items[4].code}/edit
1148
+ - type: Text
1149
+ props:
1150
+ text: ${data.routes.items[4].entrySummary}
1151
+ type: secondary
1152
+ - type: Flex
1153
+ props:
1154
+ align: center
1155
+ gap: small
1156
+ style:
1157
+ flexWrap: wrap
1158
+ children:
1159
+ - type: Badge
1160
+ when: ${data.routes.items[4].tags[0] != null}
1161
+ props:
1162
+ text: ${data.routes.items[4].tags[0]}
1163
+ variant: outline
1164
+ - type: Badge
1165
+ when: ${data.routes.items[4].tags[1] != null}
1166
+ props:
1167
+ text: ${data.routes.items[4].tags[1]}
1168
+ variant: outline
1169
+ - type: Badge
1170
+ when: ${data.routes.items[4].tags[2] != null}
1171
+ props:
1172
+ text: ${data.routes.items[4].tags[2]}
1173
+ variant: outline
1174
+ - type: Badge
1175
+ when: ${data.routes.items[4].tags[3] != null}
1176
+ props:
1177
+ text: ${data.routes.items[4].tags[3]}
1178
+ variant: outline
1179
+ - type: Text
1180
+ when: ${data.routes.items[4].tags.length == 0}
1181
+ props:
1182
+ text: —
1183
+ type: secondary
1184
+ - type: Text
1185
+ props:
1186
+ text: ${data.routes.items[4].policySummary}
1187
+ type: secondary
1188
+ className: text-sm
1189
+ - type: RouteCardLink
1190
+ when: ${data.routes.items[5] != null}
1191
+ props:
1192
+ href: /routes/${data.routes.items[5].code}
1193
+ children:
1194
+ - type: Card
1195
+ props:
1196
+ className: h-full model-card relative
1197
+ children:
1198
+ - type: Flex
1199
+ props:
1200
+ align: center
1201
+ gap: middle
1202
+ children:
1203
+ - type: Badge
1204
+ props:
1205
+ text: ${data.routes.items[5].typeLabel}
1206
+ variant: outline
1207
+ - type: Flex
1208
+ props:
1209
+ direction: vertical
1210
+ gap: 0
1211
+ style:
1212
+ alignItems: flex-start
1213
+ children:
1214
+ - type: Button
1215
+ props:
1216
+ text: ${data.routes.items[5].name}
1217
+ variant: link
1218
+ className: p-0 font-semibold text-base
1219
+ events:
1220
+ onClick:
1221
+ - action: navigate
1222
+ params:
1223
+ to: /routes/${data.routes.items[5].code}
1224
+ - type: Text
1225
+ props:
1226
+ text: ${data.routes.items[5].code}
1227
+ type: secondary
1228
+ className: text-sm
1229
+ - type: Badge
1230
+ when: ${data.routes.items[5].status == 'draft'}
1231
+ props:
1232
+ text: 草稿
1233
+ variant: secondary
1234
+ - type: Flex
1235
+ props:
1236
+ align: center
1237
+ gap: 2
1238
+ className: absolute right-3 top-3 model-card-actions
1239
+ children:
1240
+ - type: Tooltip
1241
+ props:
1242
+ content: "${data.routes.items[5].status == 'enabled' ? '停用' : '启用'}"
1243
+ children:
1244
+ - type: Button
1245
+ props:
1246
+ variant: text
1247
+ size: small
1248
+ className: size-6 p-0
1249
+ children:
1250
+ - type: StatusToggleIcon
1251
+ props:
1252
+ enabled: ${data.routes.items[5].status == 'enabled'}
1253
+ events:
1254
+ onClick:
1255
+ - id: statusCfm
1256
+ action: overlay.open
1257
+ params:
1258
+ overlay:
1259
+ type: modal
1260
+ title: "${data.routes.items[5].status == 'enabled' ? '确认停用 Route' : '确认启用
1261
+ Route'}"
1262
+ width: 480
1263
+ content:
1264
+ type: Flex
1265
+ props:
1266
+ direction: vertical
1267
+ gap: middle
1268
+ children:
1269
+ - type: Text
1270
+ props:
1271
+ size: small
1272
+ text: "${data.routes.items[5].status == 'enabled' ? '停用后,Runtime
1273
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
1274
+ '启用后,Runtime
1275
+ 将按入口配置与路由策略匹配并调度该路由。'}"
1276
+ - type: Flex
1277
+ props:
1278
+ direction: vertical
1279
+ gap: small
1280
+ children:
1281
+ - type: Text
1282
+ props:
1283
+ text: 影响范围:
1284
+ strong: true
1285
+ - type: Text
1286
+ props:
1287
+ text: · 关联模型:${data.routes.items[5].models.length} 个(启用
1288
+ ${data.routes.items[5].enabledModelCount}
1289
+ 个)
1290
+ type: secondary
1291
+ - type: Text
1292
+ props:
1293
+ text: · 请求入口:${data.routes.items[5].path} · ${data.routes.items[5].protocol}
1294
+ type: secondary
1295
+ - type: Text
1296
+ when: ${data.routes.items[5].status == 'enabled' &&
1297
+ data.routes.items[5].enabledModelCount
1298
+ > 0}
1299
+ props:
1300
+ size: small
1301
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
1302
+ type: warning
1303
+ - type: Flex
1304
+ props:
1305
+ justify: end
1306
+ gap: middle
1307
+ children:
1308
+ - type: Button
1309
+ props:
1310
+ text: 取消
1311
+ events:
1312
+ onClick:
1313
+ - action: overlay.close
1314
+ - type: Button
1315
+ props:
1316
+ text: "${data.routes.items[5].status == 'enabled' ? '确认停用' : '确认启用'}"
1317
+ variant: primary
1318
+ danger: ${data.routes.items[5].status == 'enabled'}
1319
+ events:
1320
+ onClick:
1321
+ - action: overlay.close
1322
+ params:
1323
+ payload:
1324
+ ok: true
1325
+ - action: if
1326
+ params:
1327
+ condition: ${actions.statusCfm.ok}
1328
+ then:
1329
+ - action: message
1330
+ params:
1331
+ messageType: success
1332
+ text: "${data.routes.items[5].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
1333
+ - type: Tooltip
1334
+ props:
1335
+ content: 编辑
1336
+ children:
1337
+ - type: Button
1338
+ props:
1339
+ icon: pencil
1340
+ variant: text
1341
+ size: small
1342
+ className: size-6 p-0
1343
+ events:
1344
+ onClick:
1345
+ - action: navigate
1346
+ params:
1347
+ to: /routes/${data.routes.items[5].code}/edit
1348
+ - type: Text
1349
+ props:
1350
+ text: ${data.routes.items[5].entrySummary}
1351
+ type: secondary
1352
+ - type: Flex
1353
+ props:
1354
+ align: center
1355
+ gap: small
1356
+ style:
1357
+ flexWrap: wrap
1358
+ children:
1359
+ - type: Badge
1360
+ when: ${data.routes.items[5].tags[0] != null}
1361
+ props:
1362
+ text: ${data.routes.items[5].tags[0]}
1363
+ variant: outline
1364
+ - type: Badge
1365
+ when: ${data.routes.items[5].tags[1] != null}
1366
+ props:
1367
+ text: ${data.routes.items[5].tags[1]}
1368
+ variant: outline
1369
+ - type: Badge
1370
+ when: ${data.routes.items[5].tags[2] != null}
1371
+ props:
1372
+ text: ${data.routes.items[5].tags[2]}
1373
+ variant: outline
1374
+ - type: Badge
1375
+ when: ${data.routes.items[5].tags[3] != null}
1376
+ props:
1377
+ text: ${data.routes.items[5].tags[3]}
1378
+ variant: outline
1379
+ - type: Text
1380
+ when: ${data.routes.items[5].tags.length == 0}
1381
+ props:
1382
+ text: —
1383
+ type: secondary
1384
+ - type: Text
1385
+ props:
1386
+ text: ${data.routes.items[5].policySummary}
1387
+ type: secondary
1388
+ className: text-sm
1389
+ - type: RouteCardLink
1390
+ when: ${data.routes.items[6] != null}
1391
+ props:
1392
+ href: /routes/${data.routes.items[6].code}
1393
+ children:
1394
+ - type: Card
1395
+ props:
1396
+ className: h-full model-card relative
1397
+ children:
1398
+ - type: Flex
1399
+ props:
1400
+ align: center
1401
+ gap: middle
1402
+ children:
1403
+ - type: Badge
1404
+ props:
1405
+ text: ${data.routes.items[6].typeLabel}
1406
+ variant: outline
1407
+ - type: Flex
1408
+ props:
1409
+ direction: vertical
1410
+ gap: 0
1411
+ style:
1412
+ alignItems: flex-start
1413
+ children:
1414
+ - type: Button
1415
+ props:
1416
+ text: ${data.routes.items[6].name}
1417
+ variant: link
1418
+ className: p-0 font-semibold text-base
1419
+ events:
1420
+ onClick:
1421
+ - action: navigate
1422
+ params:
1423
+ to: /routes/${data.routes.items[6].code}
1424
+ - type: Text
1425
+ props:
1426
+ text: ${data.routes.items[6].code}
1427
+ type: secondary
1428
+ className: text-sm
1429
+ - type: Badge
1430
+ when: ${data.routes.items[6].status == 'draft'}
1431
+ props:
1432
+ text: 草稿
1433
+ variant: secondary
1434
+ - type: Flex
1435
+ props:
1436
+ align: center
1437
+ gap: 2
1438
+ className: absolute right-3 top-3 model-card-actions
1439
+ children:
1440
+ - type: Tooltip
1441
+ props:
1442
+ content: "${data.routes.items[6].status == 'enabled' ? '停用' : '启用'}"
1443
+ children:
1444
+ - type: Button
1445
+ props:
1446
+ variant: text
1447
+ size: small
1448
+ className: size-6 p-0
1449
+ children:
1450
+ - type: StatusToggleIcon
1451
+ props:
1452
+ enabled: ${data.routes.items[6].status == 'enabled'}
1453
+ events:
1454
+ onClick:
1455
+ - id: statusCfm
1456
+ action: overlay.open
1457
+ params:
1458
+ overlay:
1459
+ type: modal
1460
+ title: "${data.routes.items[6].status == 'enabled' ? '确认停用 Route' : '确认启用
1461
+ Route'}"
1462
+ width: 480
1463
+ content:
1464
+ type: Flex
1465
+ props:
1466
+ direction: vertical
1467
+ gap: middle
1468
+ children:
1469
+ - type: Text
1470
+ props:
1471
+ size: small
1472
+ text: "${data.routes.items[6].status == 'enabled' ? '停用后,Runtime
1473
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
1474
+ '启用后,Runtime
1475
+ 将按入口配置与路由策略匹配并调度该路由。'}"
1476
+ - type: Flex
1477
+ props:
1478
+ direction: vertical
1479
+ gap: small
1480
+ children:
1481
+ - type: Text
1482
+ props:
1483
+ text: 影响范围:
1484
+ strong: true
1485
+ - type: Text
1486
+ props:
1487
+ text: · 关联模型:${data.routes.items[6].models.length} 个(启用
1488
+ ${data.routes.items[6].enabledModelCount}
1489
+ 个)
1490
+ type: secondary
1491
+ - type: Text
1492
+ props:
1493
+ text: · 请求入口:${data.routes.items[6].path} · ${data.routes.items[6].protocol}
1494
+ type: secondary
1495
+ - type: Text
1496
+ when: ${data.routes.items[6].status == 'enabled' &&
1497
+ data.routes.items[6].enabledModelCount
1498
+ > 0}
1499
+ props:
1500
+ size: small
1501
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
1502
+ type: warning
1503
+ - type: Flex
1504
+ props:
1505
+ justify: end
1506
+ gap: middle
1507
+ children:
1508
+ - type: Button
1509
+ props:
1510
+ text: 取消
1511
+ events:
1512
+ onClick:
1513
+ - action: overlay.close
1514
+ - type: Button
1515
+ props:
1516
+ text: "${data.routes.items[6].status == 'enabled' ? '确认停用' : '确认启用'}"
1517
+ variant: primary
1518
+ danger: ${data.routes.items[6].status == 'enabled'}
1519
+ events:
1520
+ onClick:
1521
+ - action: overlay.close
1522
+ params:
1523
+ payload:
1524
+ ok: true
1525
+ - action: if
1526
+ params:
1527
+ condition: ${actions.statusCfm.ok}
1528
+ then:
1529
+ - action: message
1530
+ params:
1531
+ messageType: success
1532
+ text: "${data.routes.items[6].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
1533
+ - type: Tooltip
1534
+ props:
1535
+ content: 编辑
1536
+ children:
1537
+ - type: Button
1538
+ props:
1539
+ icon: pencil
1540
+ variant: text
1541
+ size: small
1542
+ className: size-6 p-0
1543
+ events:
1544
+ onClick:
1545
+ - action: navigate
1546
+ params:
1547
+ to: /routes/${data.routes.items[6].code}/edit
1548
+ - type: Text
1549
+ props:
1550
+ text: ${data.routes.items[6].entrySummary}
1551
+ type: secondary
1552
+ - type: Flex
1553
+ props:
1554
+ align: center
1555
+ gap: small
1556
+ style:
1557
+ flexWrap: wrap
1558
+ children:
1559
+ - type: Badge
1560
+ when: ${data.routes.items[6].tags[0] != null}
1561
+ props:
1562
+ text: ${data.routes.items[6].tags[0]}
1563
+ variant: outline
1564
+ - type: Badge
1565
+ when: ${data.routes.items[6].tags[1] != null}
1566
+ props:
1567
+ text: ${data.routes.items[6].tags[1]}
1568
+ variant: outline
1569
+ - type: Badge
1570
+ when: ${data.routes.items[6].tags[2] != null}
1571
+ props:
1572
+ text: ${data.routes.items[6].tags[2]}
1573
+ variant: outline
1574
+ - type: Badge
1575
+ when: ${data.routes.items[6].tags[3] != null}
1576
+ props:
1577
+ text: ${data.routes.items[6].tags[3]}
1578
+ variant: outline
1579
+ - type: Text
1580
+ when: ${data.routes.items[6].tags.length == 0}
1581
+ props:
1582
+ text: —
1583
+ type: secondary
1584
+ - type: Text
1585
+ props:
1586
+ text: ${data.routes.items[6].policySummary}
1587
+ type: secondary
1588
+ className: text-sm
1589
+ - type: RouteCardLink
1590
+ when: ${data.routes.items[7] != null}
1591
+ props:
1592
+ href: /routes/${data.routes.items[7].code}
1593
+ children:
1594
+ - type: Card
1595
+ props:
1596
+ className: h-full model-card relative
1597
+ children:
1598
+ - type: Flex
1599
+ props:
1600
+ align: center
1601
+ gap: middle
1602
+ children:
1603
+ - type: Badge
1604
+ props:
1605
+ text: ${data.routes.items[7].typeLabel}
1606
+ variant: outline
1607
+ - type: Flex
1608
+ props:
1609
+ direction: vertical
1610
+ gap: 0
1611
+ style:
1612
+ alignItems: flex-start
1613
+ children:
1614
+ - type: Button
1615
+ props:
1616
+ text: ${data.routes.items[7].name}
1617
+ variant: link
1618
+ className: p-0 font-semibold text-base
1619
+ events:
1620
+ onClick:
1621
+ - action: navigate
1622
+ params:
1623
+ to: /routes/${data.routes.items[7].code}
1624
+ - type: Text
1625
+ props:
1626
+ text: ${data.routes.items[7].code}
1627
+ type: secondary
1628
+ className: text-sm
1629
+ - type: Badge
1630
+ when: ${data.routes.items[7].status == 'draft'}
1631
+ props:
1632
+ text: 草稿
1633
+ variant: secondary
1634
+ - type: Flex
1635
+ props:
1636
+ align: center
1637
+ gap: 2
1638
+ className: absolute right-3 top-3 model-card-actions
1639
+ children:
1640
+ - type: Tooltip
1641
+ props:
1642
+ content: "${data.routes.items[7].status == 'enabled' ? '停用' : '启用'}"
1643
+ children:
1644
+ - type: Button
1645
+ props:
1646
+ variant: text
1647
+ size: small
1648
+ className: size-6 p-0
1649
+ children:
1650
+ - type: StatusToggleIcon
1651
+ props:
1652
+ enabled: ${data.routes.items[7].status == 'enabled'}
1653
+ events:
1654
+ onClick:
1655
+ - id: statusCfm
1656
+ action: overlay.open
1657
+ params:
1658
+ overlay:
1659
+ type: modal
1660
+ title: "${data.routes.items[7].status == 'enabled' ? '确认停用 Route' : '确认启用
1661
+ Route'}"
1662
+ width: 480
1663
+ content:
1664
+ type: Flex
1665
+ props:
1666
+ direction: vertical
1667
+ gap: middle
1668
+ children:
1669
+ - type: Text
1670
+ props:
1671
+ size: small
1672
+ text: "${data.routes.items[7].status == 'enabled' ? '停用后,Runtime
1673
+ 不再匹配该路由,客户端通过该入口的调用将失败。' :
1674
+ '启用后,Runtime
1675
+ 将按入口配置与路由策略匹配并调度该路由。'}"
1676
+ - type: Flex
1677
+ props:
1678
+ direction: vertical
1679
+ gap: small
1680
+ children:
1681
+ - type: Text
1682
+ props:
1683
+ text: 影响范围:
1684
+ strong: true
1685
+ - type: Text
1686
+ props:
1687
+ text: · 关联模型:${data.routes.items[7].models.length} 个(启用
1688
+ ${data.routes.items[7].enabledModelCount}
1689
+ 个)
1690
+ type: secondary
1691
+ - type: Text
1692
+ props:
1693
+ text: · 请求入口:${data.routes.items[7].path} · ${data.routes.items[7].protocol}
1694
+ type: secondary
1695
+ - type: Text
1696
+ when: ${data.routes.items[7].status == 'enabled' &&
1697
+ data.routes.items[7].enabledModelCount
1698
+ > 0}
1699
+ props:
1700
+ size: small
1701
+ text: ⚠ 存在启用模型时,建议先完成流量切换再停用。
1702
+ type: warning
1703
+ - type: Flex
1704
+ props:
1705
+ justify: end
1706
+ gap: middle
1707
+ children:
1708
+ - type: Button
1709
+ props:
1710
+ text: 取消
1711
+ events:
1712
+ onClick:
1713
+ - action: overlay.close
1714
+ - type: Button
1715
+ props:
1716
+ text: "${data.routes.items[7].status == 'enabled' ? '确认停用' : '确认启用'}"
1717
+ variant: primary
1718
+ danger: ${data.routes.items[7].status == 'enabled'}
1719
+ events:
1720
+ onClick:
1721
+ - action: overlay.close
1722
+ params:
1723
+ payload:
1724
+ ok: true
1725
+ - action: if
1726
+ params:
1727
+ condition: ${actions.statusCfm.ok}
1728
+ then:
1729
+ - action: message
1730
+ params:
1731
+ messageType: success
1732
+ text: "${data.routes.items[7].status == 'enabled' ? '已停用' : '已启用'}(演示:静态页面不落库)"
1733
+ - type: Tooltip
1734
+ props:
1735
+ content: 编辑
1736
+ children:
1737
+ - type: Button
1738
+ props:
1739
+ icon: pencil
1740
+ variant: text
1741
+ size: small
1742
+ className: size-6 p-0
1743
+ events:
1744
+ onClick:
1745
+ - action: navigate
1746
+ params:
1747
+ to: /routes/${data.routes.items[7].code}/edit
1748
+ - type: Text
1749
+ props:
1750
+ text: ${data.routes.items[7].entrySummary}
1751
+ type: secondary
1752
+ - type: Flex
1753
+ props:
1754
+ align: center
1755
+ gap: small
1756
+ style:
1757
+ flexWrap: wrap
1758
+ children:
1759
+ - type: Badge
1760
+ when: ${data.routes.items[7].tags[0] != null}
1761
+ props:
1762
+ text: ${data.routes.items[7].tags[0]}
1763
+ variant: outline
1764
+ - type: Badge
1765
+ when: ${data.routes.items[7].tags[1] != null}
1766
+ props:
1767
+ text: ${data.routes.items[7].tags[1]}
1768
+ variant: outline
1769
+ - type: Badge
1770
+ when: ${data.routes.items[7].tags[2] != null}
1771
+ props:
1772
+ text: ${data.routes.items[7].tags[2]}
1773
+ variant: outline
1774
+ - type: Badge
1775
+ when: ${data.routes.items[7].tags[3] != null}
1776
+ props:
1777
+ text: ${data.routes.items[7].tags[3]}
1778
+ variant: outline
1779
+ - type: Text
1780
+ when: ${data.routes.items[7].tags.length == 0}
1781
+ props:
1782
+ text: —
1783
+ type: secondary
1784
+ - type: Text
1785
+ props:
1786
+ text: ${data.routes.items[7].policySummary}
1787
+ type: secondary
1788
+ className: text-sm
1789
+ - type: Empty
1790
+ when: ${data.routes.items != null && data.routes.items.length == 0}
1791
+ props:
1792
+ title: 无匹配路由
1793
+ description: 调整状态、类型或标签筛选后重试;也可以新建一条路由