style(usage): unify name column header + DeletedTag across breakdown tables

This commit is contained in:
jialin
2026-07-09 15:17:53 +08:00
committed by jialin
parent 7d9f68da2d
commit e79d49f2a8
7 changed files with 98 additions and 69 deletions
+10 -15
View File
@@ -2,8 +2,8 @@
import { getGPUStackPlugin } from '@/plugins';
import { AutoTooltip } from '@gpustack/core-ui';
import { useIntl } from '@umijs/max';
import { Tag } from 'antd';
import { useMemo } from 'react';
import DeletedTag from '../components/deleted-tag';
import { BreakdownItem as ListItem } from '../config/types';
// Plugin slot: enterprise plugins can contribute extra columns to the
@@ -51,27 +51,22 @@ const useModelsColumns = (): ColumnDef[] => {
dataIndex: ['route', 'label'],
key: 'route_name',
render: (text: string, record: ListItem) => (
<span className="flex items-center">
<span className="flex items-center gap-8">
<AutoTooltip
ghost
style={{ maxWidth: 400 }}
title={<span>{text}</span>}
>
<span className="text-primary">{text}</span>
<span
className={
record.route?.deleted ? 'text-tertiary' : 'text-primary'
}
>
{text}
</span>
</AutoTooltip>
{record.route?.deleted && (
<Tag
style={{
marginLeft: 8,
borderRadius: 12,
color: 'var(--ant-color-text-tertiary)',
borderColor: 'var(--ant-color-split)',
backgroundColor: 'transparent'
}}
variant="outlined"
>
{intl.formatMessage({ id: 'usage.table.deleted' })}
</Tag>
<DeletedTag id={record.route?.identity?.current?.route_id} />
)}
</span>
)