diff --git a/src/pages/gpu-service/instances/hooks/use-instances-columns.tsx b/src/pages/gpu-service/instances/hooks/use-instances-columns.tsx index 3c2ffbd9..0aa4a690 100644 --- a/src/pages/gpu-service/instances/hooks/use-instances-columns.tsx +++ b/src/pages/gpu-service/instances/hooks/use-instances-columns.tsx @@ -86,11 +86,22 @@ const useInstancesColumns = ({ const description = JSON.parse(record?.description || '{}').spec || {}; return ( - - {description.acceleratable - ? `${description.product} x ${record.spec?.resources?.accelerator}` - : 'CPU'} - + + {description.acceleratable + ? `${description.product} x ${record.spec?.resources?.accelerator}` + : 'CPU'} + + } + > + + {description.acceleratable + ? `${description.product} x ${record.spec?.resources?.accelerator}` + : 'CPU'} + + ( -
- {renderInstanceType(record)} -
- ) + width: 260, + render: (_text: string, record: ListItem) => renderInstanceType(record) }, { title: intl.formatMessage({ id: 'clusters.title' }), dataIndex: 'clusterId', hidden: !access.canSeeAdmin, + ellipsis: { + showTitle: false + }, render: (id: number) => ( {_.find(clusterList, { value: id })?.label || id || '-'} @@ -264,6 +274,7 @@ const useInstancesColumns = ({ ellipsis: { showTitle: false }, + width: 180, render: (text: string) => ( {text ? dayjs(text).format('YYYY-MM-DD HH:mm:ss') : '-'} diff --git a/src/pages/llmodels/components/instance-cells/actions-cell.tsx b/src/pages/llmodels/components/instance-cells/actions-cell.tsx index bdf52137..56d1996f 100644 --- a/src/pages/llmodels/components/instance-cells/actions-cell.tsx +++ b/src/pages/llmodels/components/instance-cells/actions-cell.tsx @@ -102,7 +102,7 @@ const ActionsCell: React.FC = ({ ) => { api.open({ duration: data.duration, - message: renderMessage(data.filename), + title: renderMessage(data.filename), key: data.filename, closeIcon: ( {intl.formatMessage({ id: 'common.button.cancel' })} diff --git a/src/pages/llmodels/components/instance-cells/name-cell.tsx b/src/pages/llmodels/components/instance-cells/name-cell.tsx index 1bf98ca8..7857486a 100644 --- a/src/pages/llmodels/components/instance-cells/name-cell.tsx +++ b/src/pages/llmodels/components/instance-cells/name-cell.tsx @@ -115,7 +115,7 @@ const NameCell: React.FC = ({ styles }) => { return ( - + {record.name} diff --git a/src/pages/llmodels/hooks/use-models-columns.tsx b/src/pages/llmodels/hooks/use-models-columns.tsx index 1a0a8ac8..2704d1f6 100644 --- a/src/pages/llmodels/hooks/use-models-columns.tsx +++ b/src/pages/llmodels/hooks/use-models-columns.tsx @@ -12,7 +12,7 @@ import { } from '@gpustack/core-ui'; import { useIntl } from '@umijs/max'; import { useMemoizedFn } from 'ahooks'; -import { Tooltip } from 'antd'; +import { Flex, Tooltip } from 'antd'; import dayjs from 'dayjs'; import { useAtomValue } from 'jotai'; import _ from 'lodash'; @@ -158,12 +158,19 @@ const useModelsColumns = ({ sorter: tableSorter(1), span: 5, render: (text: string, record: ListItem) => ( - - + + + {text} + + } + > {text} - +
) }, { diff --git a/src/pages/llmodels/instance-view/use-instance-columns.tsx b/src/pages/llmodels/instance-view/use-instance-columns.tsx index ff82c76f..3d215f8d 100644 --- a/src/pages/llmodels/instance-view/use-instance-columns.tsx +++ b/src/pages/llmodels/instance-view/use-instance-columns.tsx @@ -4,7 +4,6 @@ import { ListItem as workerListItem } from '@/pages/resources/config/types'; import { convertFileSize } from '@/utils'; import { AutoTooltip, IconFont } from '@gpustack/core-ui'; import { useIntl } from '@umijs/max'; -import { Flex } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import dayjs from 'dayjs'; import _ from 'lodash'; @@ -12,7 +11,6 @@ import { useMemo } from 'react'; import ActionsCell from '../components/instance-cells/actions-cell'; import DistributeInfoCell from '../components/instance-cells/distribute-info-cell'; import DownloadingStatusCell from '../components/instance-cells/downloading-status-cell'; -import InjectedParamsCell from '../components/instance-cells/injected-params-cell'; import InstanceStatusCell from '../components/instance-cells/instance-status-cell'; import NameCell, { NameCellProps @@ -29,10 +27,6 @@ const WorkerInfoContent: React.FC = ({ record, modelData }) => { return (
{record.worker_name}
- {/*
- - {workerIp} -
*/}
= ({ record, modelData }) => { ]
- {/*
- - - {record?.backend || modelData?.backend || ''} - {record.backend_version || modelData?.backend_version - ? `(${record.backend_version || modelData?.backend_version})` - : ''} - -
*/}
); }; @@ -101,38 +83,20 @@ const useInstancesColumns = (options: { title: intl.formatMessage({ id: 'common.table.name' }), dataIndex: 'name', sorter: tableSorter(1), - minWidth: 160, render: (value: string, record: ListItem) => ( - <> - - - - - {/*
- - - {record?.backend || record?.backend || ''} - {record.backend_version || record?.backend_version - ? `(${record.backend_version || record?.backend_version})` - : ''} - -
*/} - + ) }, {