mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-12 19:12:48 +08:00
fix: 健康状态详情优化 & Connector 样式优化 & 无MM2任务指标兜底页
This commit is contained in:
@@ -19,6 +19,7 @@ const CheckDetail = forwardRef((props: any, ref): JSX.Element => {
|
||||
const getHealthDetail = () => {
|
||||
setLoading(true);
|
||||
return Utils.request(API.getResourceListHealthDetail(+clusterId)).then((res: any) => {
|
||||
res.sort((a: any, b: any) => a.dimension - b.dimension);
|
||||
setData(res);
|
||||
setLoading(false);
|
||||
});
|
||||
|
||||
@@ -40,6 +40,10 @@ export const dimensionMap = {
|
||||
label: 'Connector',
|
||||
href: '/connect/connectors',
|
||||
},
|
||||
7: {
|
||||
label: 'MirrorMaker',
|
||||
href: '/replication',
|
||||
},
|
||||
} as any;
|
||||
|
||||
const toLowerCase = (name = '') => {
|
||||
@@ -95,6 +99,18 @@ const CONFIG_ITEM_DETAIL_DESC = {
|
||||
ConnectorUnassignedTaskCount: (valueGroup: any) => {
|
||||
return `未被分配的任务数量 小于 ${valueGroup?.value}`;
|
||||
},
|
||||
MirrorMakerFailedTaskCount: (valueGroup: any) => {
|
||||
return `失败状态的任务数量 小于 ${valueGroup?.value}`;
|
||||
},
|
||||
MirrorMakerUnassignedTaskCount: (valueGroup: any) => {
|
||||
return `未被分配的任务数量 小于 ${valueGroup?.value}`;
|
||||
},
|
||||
ReplicationLatencyMsMax: (valueGroup: any) => {
|
||||
return `消息复制最大延迟时间 小于 ${valueGroup?.value}`;
|
||||
},
|
||||
'TotalRecord-errors': (valueGroup: any) => {
|
||||
return `消息处理错误的次数 增量小于 ${valueGroup?.value}`;
|
||||
},
|
||||
};
|
||||
|
||||
export const getConfigItemDetailDesc = (item: keyof typeof CONFIG_ITEM_DETAIL_DESC, valueGroup: any) => {
|
||||
@@ -409,6 +425,42 @@ export const getHealthySettingColumn = (form: any, data: any, clusterId: string)
|
||||
</div>
|
||||
);
|
||||
}
|
||||
case 'MirrorMakerFailedTaskCount': {
|
||||
return (
|
||||
<div className="table-form-item">
|
||||
<span className="left-text">{'>'}</span>
|
||||
{getFormItem({ configItem, attrs: { min: 0, max: 99998 } })}
|
||||
<span className="right-text">则不通过</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
case 'MirrorMakerUnassignedTaskCount': {
|
||||
return (
|
||||
<div className="table-form-item">
|
||||
<span className="left-text">{'>'}</span>
|
||||
{getFormItem({ configItem, attrs: { min: 0, max: 99998 } })}
|
||||
<span className="right-text">则不通过</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
case 'ReplicationLatencyMsMax': {
|
||||
return (
|
||||
<div className="table-form-item">
|
||||
<span className="left-text">{'>'}</span>
|
||||
{getFormItem({ configItem, attrs: { min: 0, max: 99998 } })}
|
||||
<span className="right-text">则不通过</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
case 'TotalRecord-errors': {
|
||||
return (
|
||||
<div className="table-form-item">
|
||||
<span className="left-text">{'>'}</span>
|
||||
{getFormItem({ configItem, attrs: { min: 0, max: 99998 } })}
|
||||
<span className="right-text">则不通过</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
default: {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user