style(usage): unify name column header + DeletedTag across breakdown tables
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user