feat(gpu-service): instance-type activate/deactivate, displayName, unified flavor display

- add activate/deactivate row actions (phase-driven) with new PUT APIs
- add displayName field; list shows displayName || name
- rename list OS column title to Platform
- share a two-line flavor renderer between the create dropdown and the list
- normalize 'CPU Only' label to 'CPU-only'
This commit is contained in:
jialin
2026-07-22 15:52:17 +08:00
parent 2763594ae3
commit 3fff1c10f2
17 changed files with 322 additions and 223 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ export interface ResourceBreakdownItem extends ResourceBreakdownSummary {
unit_memory_mib?: number;
vram_mib?: number;
// Instance totals (requested cpu/ram) — the real size, so CPU instance types
// show "CPU Only · 2 vCPU · 4 GB" instead of just the per-unit spec.
// show "CPU-only · 2 vCPU · 4 GB" instead of just the per-unit spec.
cpu_milli?: number;
memory_mib?: number;
// Per-instance rows also carry the card count + ephemeral disk so the
@@ -382,7 +382,7 @@ function flattenItem(
if (it.creator_deleted != null) flat.user_deleted = !!it.creator_deleted;
// Instance-type grouped trend: the series label (``group``) defaults to the
// raw flavor slug. Instance Types are grouped by actual shape, so label each
// series by that shape — "<product> x <cards>" / "CPU Only · 3 vCPU · 6 GB" —
// series by that shape — "<product> x <cards>" / "CPU-only · 3 vCPU · 6 GB" —
// matching the table and keeping every shape a distinct series (#5700).
// ``groupBy`` is the unmapped frontend dimension; the instance-type axis is
// ``gpu_type`` (→ backend ``instance_type`` via GROUP_BY_MAP).