diff --git a/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx b/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx index 60d7dd72..780161e3 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx +++ b/km-console/packages/layout-clusters-fe/src/pages/TopicList/index.tsx @@ -18,6 +18,7 @@ import ReplicaMove from '@src/components/TopicJob/ReplicaMove'; import { formatAssignSize } from '../Jobs/config'; import { DownOutlined } from '@ant-design/icons'; import { tableHeaderPrefix } from '@src/constants/common'; +import {sliderValueMap} from "@src/pages/MutliClusterPage/config"; const { Option } = Select; @@ -90,8 +91,9 @@ const AutoPage = (props: any) => { // return item?.value || ''; const orgVal = record?.latestMetrics?.metrics?.[metricName]; if (orgVal !== undefined) { - if (metricName === 'HealthScore') { - return Math.round(orgVal).toLocaleString(); + if (metricName === 'HealthState') { + const val = sliderValueMap[(orgVal) as keyof typeof sliderValueMap]; + return val.name; } else if (metricName === 'LogSize') { return Number(Utils.formatAssignSize(orgVal, 'MB')).toLocaleString(); } else { @@ -157,13 +159,15 @@ const AutoPage = (props: any) => { width: 95, }, { - title: '健康分', - dataIndex: 'HealthScore', - key: 'HealthScore', + title: '健康状态', + dataIndex: 'HealthState', + key: 'HealthState', sorter: true, // 设计图上量出来的是144,但做的时候发现写144 header部分的sort箭头不出来,所以临时调大些 width: 170, - render: (value: any, record: any) => renderLine(record, 'HealthScore'), + render: (value: any, record: any) =>{ + return calcCurValue(record, "HealthState") + }, }, // { // title: '创建时间',