mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-02 10:14:34 +08:00
[Feat]Topic列表健康分修改为健康状态(#758)
This commit is contained in:
@@ -18,6 +18,7 @@ import ReplicaMove from '@src/components/TopicJob/ReplicaMove';
|
|||||||
import { formatAssignSize } from '../Jobs/config';
|
import { formatAssignSize } from '../Jobs/config';
|
||||||
import { DownOutlined } from '@ant-design/icons';
|
import { DownOutlined } from '@ant-design/icons';
|
||||||
import { tableHeaderPrefix } from '@src/constants/common';
|
import { tableHeaderPrefix } from '@src/constants/common';
|
||||||
|
import {sliderValueMap} from "@src/pages/MutliClusterPage/config";
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
@@ -90,8 +91,9 @@ const AutoPage = (props: any) => {
|
|||||||
// return item?.value || '';
|
// return item?.value || '';
|
||||||
const orgVal = record?.latestMetrics?.metrics?.[metricName];
|
const orgVal = record?.latestMetrics?.metrics?.[metricName];
|
||||||
if (orgVal !== undefined) {
|
if (orgVal !== undefined) {
|
||||||
if (metricName === 'HealthScore') {
|
if (metricName === 'HealthState') {
|
||||||
return Math.round(orgVal).toLocaleString();
|
const val = sliderValueMap[(orgVal) as keyof typeof sliderValueMap];
|
||||||
|
return val.name;
|
||||||
} else if (metricName === 'LogSize') {
|
} else if (metricName === 'LogSize') {
|
||||||
return Number(Utils.formatAssignSize(orgVal, 'MB')).toLocaleString();
|
return Number(Utils.formatAssignSize(orgVal, 'MB')).toLocaleString();
|
||||||
} else {
|
} else {
|
||||||
@@ -157,13 +159,15 @@ const AutoPage = (props: any) => {
|
|||||||
width: 95,
|
width: 95,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '健康分',
|
title: '健康状态',
|
||||||
dataIndex: 'HealthScore',
|
dataIndex: 'HealthState',
|
||||||
key: 'HealthScore',
|
key: 'HealthState',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
// 设计图上量出来的是144,但做的时候发现写144 header部分的sort箭头不出来,所以临时调大些
|
// 设计图上量出来的是144,但做的时候发现写144 header部分的sort箭头不出来,所以临时调大些
|
||||||
width: 170,
|
width: 170,
|
||||||
render: (value: any, record: any) => renderLine(record, 'HealthScore'),
|
render: (value: any, record: any) =>{
|
||||||
|
return calcCurValue(record, "HealthState")
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '创建时间',
|
// title: '创建时间',
|
||||||
|
|||||||
Reference in New Issue
Block a user