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:
@@ -115,7 +115,7 @@ function getInstanceDerived(item: InstanceTypeItemModel) {
|
||||
acceleratable,
|
||||
isGPU: acceleratable,
|
||||
manufacturer: acceleratable ? spec.manufacturer || '' : 'cpu', // GPU manufacturer or 'cpu' for non-acceleratable types
|
||||
displayName: acceleratable ? spec.product || item.name : 'CPU Only',
|
||||
displayName: acceleratable ? spec.product || item.name : 'CPU-only',
|
||||
ramUnit: spec.unitResourcesParsed?.ram?.value,
|
||||
os: _.capitalize(spec.os) || '',
|
||||
arch: spec.arch,
|
||||
|
||||
@@ -131,7 +131,7 @@ export const renderInstanceType = (
|
||||
// Types breakdown only wants CPU + RAM, for example.
|
||||
categories?: SpecCategory[];
|
||||
// Override the primary label (default: derived "<product> x <count>" /
|
||||
// "CPU Only"). The Instance Types breakdown keeps its plain product name.
|
||||
// "CPU-only"). The Instance Types breakdown keeps its plain product name.
|
||||
title?: string;
|
||||
}
|
||||
) => {
|
||||
@@ -148,7 +148,7 @@ export const renderInstanceType = (
|
||||
? isSliced
|
||||
? `${description.product} (${sliceMemoryPercentage}%)`
|
||||
: `${description.product} x ${accelerator}`
|
||||
: 'CPU Only');
|
||||
: 'CPU-only');
|
||||
|
||||
const volume = (record.spec as any)?.volume;
|
||||
// Spec popover grouped by category (GPU / CPU / Memory / Disk), mirroring
|
||||
@@ -251,7 +251,7 @@ const mibToGiQuantity = (mib?: number): string | undefined =>
|
||||
export interface InstanceTypeMiB {
|
||||
name?: string;
|
||||
product?: string;
|
||||
// accelerator (GPU card) count; 0/undefined → CPU-only ("CPU Only").
|
||||
// accelerator (GPU card) count; 0/undefined → CPU-only.
|
||||
gpuCount?: number;
|
||||
// Per-card values.
|
||||
unitCpuMilli?: number;
|
||||
|
||||
Reference in New Issue
Block a user