fix: benchmark tooltip

This commit is contained in:
jialin
2026-02-06 18:34:20 +08:00
parent 4132494a49
commit 4a582ec8b1
9 changed files with 51 additions and 32 deletions
@@ -20,7 +20,11 @@ const useBenchmarkColumns = (params: {
return useMemo(() => {
return [
{
title: intl.formatMessage({ id: 'common.table.name' }),
title: (
<AutoTooltip ghost minWidth={20}>
{intl.formatMessage({ id: 'common.table.name' })}
</AutoTooltip>
),
dataIndex: 'name',
sorter: tableSorter(1),
render: (text: string, record) => (
@@ -33,7 +37,11 @@ const useBenchmarkColumns = (params: {
},
...columns,
{
title: intl.formatMessage({ id: 'common.table.operation' }),
title: (
<AutoTooltip ghost minWidth={20}>
{intl.formatMessage({ id: 'common.table.operation' })}
</AutoTooltip>
),
dataIndex: 'operations',
ellipsis: {
showTitle: false
@@ -178,7 +178,7 @@ const useColumnSettings = (options: {
sorter: tableSorter(1),
render: (text: string) => (
<AutoTooltip ghost minWidth={20}>
{_.round(text, 0)}
{_.round(text, 2)}
</AutoTooltip>
)
},
@@ -253,8 +253,11 @@ const useColumnSettings = (options: {
const metadataColumns = [
{
title: renderTitle(intl.formatMessage({ id: 'clusters.title' })),
pos: 1,
title: (
<AutoTooltip ghost minWidth={20}>
{intl.formatMessage({ id: 'clusters.title' })}
</AutoTooltip>
),
dataIndex: 'cluster_id',
render: (text: number) => (
<AutoTooltip ghost minWidth={20}>
@@ -353,7 +356,7 @@ const useColumnSettings = (options: {
(fieldSortPos[a.dataIndex] || 0) - (fieldSortPos[b.dataIndex] || 0)
);
return selected;
}, [selectedColumns, clusterList]);
}, [selectedColumns, clusterList, intl, profileOptions]);
const SettingsButton = (
<ColumnSettings