diff --git a/src/pages/gpu-service/instances/components/instance-type-item.tsx b/src/pages/gpu-service/instances/components/instance-type-item.tsx index a0ea012e..52f3c8e5 100644 --- a/src/pages/gpu-service/instances/components/instance-type-item.tsx +++ b/src/pages/gpu-service/instances/components/instance-type-item.tsx @@ -137,13 +137,9 @@ export const InstanceMetadataSection: React.FC = ({ spec } as InstanceTypeItemModel); - // Sliceable types show "Max {n} · Sliceable {m}%" instead of just the count. + // Sliceable types get a dedicated "Sliceable {n}%" row (on its own grid row) + // rather than crowding it into the Max cell. const showSliceable = !!spec.sliceable && (slicedMaxPercentage ?? 0) > 0; - const maxValue = showSliceable - ? `${spec.maxComputeUnitCount || 0} · ${intl.formatMessage({ - id: 'gpuservice.instance.sliceable' - })} ${slicedMaxPercentage}%` - : `${spec.maxComputeUnitCount || 0}`; return ( @@ -171,7 +167,7 @@ export const InstanceMetadataSection: React.FC = ({ }, { count: '' } )} - value={maxValue} + value={`${spec.maxComputeUnitCount || 0}`} /> {/* row 2: OS | Arch | CPU */} = ({ } /> + {/* row 3 (sliceable types only): Sliceable {n}% on its own row */} + )} diff --git a/src/pages/gpu-service/instances/components/instance-type-list.tsx b/src/pages/gpu-service/instances/components/instance-type-list.tsx index 8d22b673..509e09a5 100644 --- a/src/pages/gpu-service/instances/components/instance-type-list.tsx +++ b/src/pages/gpu-service/instances/components/instance-type-list.tsx @@ -4,6 +4,7 @@ import { TemplateCard } from '@gpustack/core-ui'; import { Empty, Flex, Spin } from 'antd'; import _ from 'lodash'; import { InstanceTypeItem as InstanceTypeItemModel } from '../config/types'; +import styles from '../styles/instances.module.less'; import InstanceTypeItem from './instance-type-item'; interface InstanceTypeListProps { @@ -50,10 +51,10 @@ const InstanceTypeList: React.FC = ({ return ( handleSelect(item)} diff --git a/src/pages/gpu-service/instances/styles/instances.module.less b/src/pages/gpu-service/instances/styles/instances.module.less index fc12e25c..197036dd 100644 --- a/src/pages/gpu-service/instances/styles/instances.module.less +++ b/src/pages/gpu-service/instances/styles/instances.module.less @@ -45,3 +45,10 @@ font-weight: 400; font-size: 12px; } + +// TemplateCard applies a fixed inline height; override to let sliceable cards +// (with the extra Sliceable row) grow while keeping a 106px floor. +.instanceTypeCard { + height: auto !important; + min-height: 106px; +}