feat(gpu-service): refine instance type card layout in create-instance drawer

- Regroup meta into aligned rows (CPU/RAM/Memory, Arch/Max/Sliced) and drop the OS row
- Use aggregated endpoint for instance types
- Share formatManufacturer helper for consistent vendor casing
This commit is contained in:
jialin
2026-07-22 15:52:17 +08:00
parent 9386f0872b
commit 15f457a0e1
3 changed files with 88 additions and 104 deletions
+12
View File
@@ -1,5 +1,17 @@
import _ from 'lodash';
// Manufacturer display: most vendors read best all-caps (NVIDIA, AMD), but a
// few read better capitalized (Intel). Shared by the instance-type list and the
// create-instance drawer so both render the vendor identically.
const CapitalizedVendors = ['intel'];
export const formatManufacturer = (manufacturer?: string | null): string => {
if (!manufacturer) return '';
return CapitalizedVendors.includes(manufacturer.toLowerCase())
? _.capitalize(manufacturer)
: _.toUpper(manufacturer);
};
export const omitPathParams = <T extends Record<string, any>>(
params: T
): Omit<T, 'namespace' | 'clusterID'> => {