mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
[Optimize] 健康检查项时间和结果显示(didi#930)
This commit is contained in:
@@ -165,17 +165,21 @@ const CardBar = (props: CardBarProps) => {
|
|||||||
dataIndex: 'passed',
|
dataIndex: 'passed',
|
||||||
width: '30%',
|
width: '30%',
|
||||||
render(value: boolean, record: any) {
|
render(value: boolean, record: any) {
|
||||||
const icon = value ? <IconFont type="icon-zhengchang"></IconFont> : <IconFont type="icon-yichang"></IconFont>;
|
if (record?.updateTime) {
|
||||||
const txt = value ? '已通过' : '未通过';
|
const icon = value ? <IconFont type="icon-zhengchang"></IconFont> : <IconFont type="icon-yichang"></IconFont>;
|
||||||
const notPassedResNameList = record.notPassedResNameList || [];
|
const txt = value ? '已通过' : '未通过';
|
||||||
return (
|
const notPassedResNameList = record.notPassedResNameList || [];
|
||||||
<div style={{ display: 'flex', width: 240 }}>
|
return (
|
||||||
<div style={{ marginRight: 6 }}>
|
<div style={{ display: 'flex', width: 240 }}>
|
||||||
{icon} {txt}
|
<div style={{ marginRight: 6 }}>
|
||||||
|
{icon} {txt}
|
||||||
|
</div>
|
||||||
|
{<TagsWithHide list={notPassedResNameList} expandTagContent="更多" />}
|
||||||
</div>
|
</div>
|
||||||
{<TagsWithHide list={notPassedResNameList} expandTagContent="更多" />}
|
);
|
||||||
</div>
|
} else {
|
||||||
);
|
return '-';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ export const getDetailColumn = (clusterId: number) => [
|
|||||||
width: 190,
|
width: 190,
|
||||||
dataIndex: 'updateTime',
|
dataIndex: 'updateTime',
|
||||||
render: (text: string) => {
|
render: (text: string) => {
|
||||||
return moment(text).format(timeFormat);
|
return text ? moment(text).format(timeFormat) : '-';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -224,21 +224,25 @@ export const getDetailColumn = (clusterId: number) => [
|
|||||||
width: 280,
|
width: 280,
|
||||||
// eslint-disable-next-line react/display-name
|
// eslint-disable-next-line react/display-name
|
||||||
render: (passed: boolean, record: any) => {
|
render: (passed: boolean, record: any) => {
|
||||||
if (passed) {
|
if (record?.updateTime) {
|
||||||
|
if (passed) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<IconFont type="icon-zhengchang" />
|
||||||
|
<span style={{ marginLeft: 4 }}>通过</span>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<div style={{ display: 'flex', alignItems: 'center', width: '240px' }}>
|
||||||
<IconFont type="icon-zhengchang" />
|
<IconFont type="icon-yichang" />
|
||||||
<span style={{ marginLeft: 4 }}>通过</span>
|
<div style={{ marginLeft: 4, marginRight: 6, flexShrink: 0 }}>未通过</div>
|
||||||
</>
|
<TagsWithHide list={record.notPassedResNameList || []} expandTagContent="更多" />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
}
|
}
|
||||||
return (
|
|
||||||
<div style={{ display: 'flex', alignItems: 'center', width: '240px' }}>
|
|
||||||
<IconFont type="icon-yichang" />
|
|
||||||
<div style={{ marginLeft: 4, marginRight: 6, flexShrink: 0 }}>未通过</div>
|
|
||||||
<TagsWithHide list={record.notPassedResNameList || []} expandTagContent="更多" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user