chore: show the backend info in instance view

This commit is contained in:
jialin
2026-06-08 15:43:21 +08:00
committed by jialin
parent e420c22a45
commit 636190b8e6
@@ -2,6 +2,7 @@
import { tableSorter } from '@/config/settings'; import { tableSorter } from '@/config/settings';
import { ListItem as workerListItem } from '@/pages/resources/config/types'; import { ListItem as workerListItem } from '@/pages/resources/config/types';
import { convertFileSize } from '@/utils'; import { convertFileSize } from '@/utils';
import { ThunderboltFilled } from '@ant-design/icons';
import { AutoTooltip, IconFont } from '@gpustack/core-ui'; import { AutoTooltip, IconFont } from '@gpustack/core-ui';
import { useIntl } from '@umijs/max'; import { useIntl } from '@umijs/max';
import { ColumnsType } from 'antd/lib/table'; import { ColumnsType } from 'antd/lib/table';
@@ -88,9 +89,11 @@ const useInstancesColumns = (options: {
title: intl.formatMessage({ id: 'common.table.name' }), title: intl.formatMessage({ id: 'common.table.name' }),
dataIndex: 'name', dataIndex: 'name',
sorter: tableSorter(1), sorter: tableSorter(1),
minWidth: 160,
render: (value: string, record: ListItem) => ( render: (value: string, record: ListItem) => (
<>
<NameCell <NameCell
showWorkerInfo={true} showWorkerInfo={false}
record={record} record={record}
modelData={{ modelData={{
backend: record.backend, backend: record.backend,
@@ -102,6 +105,19 @@ const useInstancesColumns = (options: {
} }
}} }}
></NameCell> ></NameCell>
<div className="flex-center">
<ThunderboltFilled
className="m-r-5 text-quaternary"
style={{ fontSize: 12, position: 'relative', top: 2 }}
/>
<span className="text-quaternary">
{record?.backend || record?.backend || ''}
{record.backend_version || record?.backend_version
? `(${record.backend_version || record?.backend_version})`
: ''}
</span>
</div>
</>
) )
}, },
{ {
@@ -121,7 +137,7 @@ const useInstancesColumns = (options: {
dataIndex: 'worker_id', dataIndex: 'worker_id',
render: (text, record) => ( render: (text, record) => (
<div className="flex-center gap-8"> <div className="flex-center gap-8">
<AutoTooltip ghost>{record.worker_name}</AutoTooltip> <AutoTooltip ghost>{renderWorkerCell(text, record)}</AutoTooltip>
<DistributeInfoCell <DistributeInfoCell
record={record} record={record}
workerList={workerList} workerList={workerList}