fix: gpu selector height

This commit is contained in:
jialin
2026-06-22 15:25:18 +08:00
committed by jialin
parent 84304eadb7
commit 03842d1741
5 changed files with 36 additions and 24 deletions
+7 -2
View File
@@ -638,10 +638,15 @@ body {
inset: 53px auto auto 0 !important;
border-radius: 0 0 var(--border-radius-base) var(--border-radius-base);
border-top: none;
max-height: 240px;
min-height: 100px;
.ant-cascader-menus {
align-items: stretch;
}
&.gpu-selector {
.ant-cascader-menu {
max-height: 400px;
height: unset;
}
.ant-cascader-menu:last-child {
flex: auto;
@@ -124,6 +124,23 @@ const Instance: React.FC = () => {
</Flex>
)
},
{
key: '2',
label: intl.formatMessage({ id: 'models.form.env' }),
children: (
<Flex gap={8} wrap="wrap">
{instanceData?.env
? Object.entries(instanceData?.env || {}).map(
([key, value], index: number) => (
<Tag key={index} style={{ margin: 0 }}>
{`${key}=${value}`}
</Tag>
)
)
: '-'}
</Flex>
)
},
{
key: '4',
label: intl.formatMessage({
@@ -159,23 +176,6 @@ const Instance: React.FC = () => {
)}
</Flex>
)
},
{
key: '2',
label: intl.formatMessage({ id: 'models.form.env' }),
children: (
<Flex gap={8} wrap="wrap">
{instanceData?.env
? Object.entries(instanceData?.env || {}).map(
([key, value], index: number) => (
<Tag key={index} style={{ margin: 0 }}>
{`${key}=${value}`}
</Tag>
)
)
: '-'}
</Flex>
)
}
];
}, [detailData]);
+3 -3
View File
@@ -1,7 +1,6 @@
import { convertFileSize } from '@/utils';
import { AutoTooltip } from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import _ from 'lodash';
import React from 'react';
import styled from 'styled-components';
import '../style/gpu-card.less';
@@ -24,6 +23,7 @@ const ItemInfo = styled.div`
display: flex;
flex-wrap: wrap;
white-space: break-spaces;
font-size: 13px;
`;
const Description = styled.div`
@@ -76,7 +76,7 @@ const GPUCard: React.FC<{
/ {convertFileSize(data?.memory?.total || 0)}
</span>
</ItemInfo>
<ItemInfo>
{/* <ItemInfo>
<span>
{intl.formatMessage({ id: 'resources.table.gpuutilization' })}
:{' '}
@@ -85,7 +85,7 @@ const GPUCard: React.FC<{
? _.round(data?.memory?.utilization_rate || 0, 2)
: _.round(data.memory?.allocated / data.memory?.total, 2) * 100}
%
</ItemInfo>
</ItemInfo> */}
</>
)
}
+8 -1
View File
@@ -175,7 +175,7 @@ const ScheduleTypeForm: React.FC = () => {
<SealCascader
required
showSearch
expandTrigger="hover"
expandTrigger="click"
multiple={
form.getFieldValue('backend') !== backendOptionsMap.voxBox
}
@@ -184,6 +184,13 @@ const ScheduleTypeForm: React.FC = () => {
root: 'cascader-popup-wrapper gpu-selector'
}
}}
styles={{
popup: {
listItem: {
maxWidth: 'unset'
}
}
}}
maxTagCount={1}
label={intl.formatMessage({ id: 'models.form.gpuselector' })}
options={gpuOptions}
+1 -1
View File
@@ -59,7 +59,7 @@ const Organizations: React.FC = () => {
</li>
))}
</ul>
<div style={{ textAlign: 'center' }}>
<div style={{ textAlign: 'center', marginTop: 56 }}>
<Button
type="primary"
href="https://gpustack.ai/enterprise"