mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-07 15:12:14 +08:00
[Optimize] 健康检查项时间和结果显示(didi#930)
This commit is contained in:
@@ -165,6 +165,7 @@ const CardBar = (props: CardBarProps) => {
|
|||||||
dataIndex: 'passed',
|
dataIndex: 'passed',
|
||||||
width: '30%',
|
width: '30%',
|
||||||
render(value: boolean, record: any) {
|
render(value: boolean, record: any) {
|
||||||
|
if (record?.updateTime) {
|
||||||
const icon = value ? <IconFont type="icon-zhengchang"></IconFont> : <IconFont type="icon-yichang"></IconFont>;
|
const icon = value ? <IconFont type="icon-zhengchang"></IconFont> : <IconFont type="icon-yichang"></IconFont>;
|
||||||
const txt = value ? '已通过' : '未通过';
|
const txt = value ? '已通过' : '未通过';
|
||||||
const notPassedResNameList = record.notPassedResNameList || [];
|
const notPassedResNameList = record.notPassedResNameList || [];
|
||||||
@@ -176,6 +177,9 @@ const CardBar = (props: CardBarProps) => {
|
|||||||
{<TagsWithHide list={notPassedResNameList} expandTagContent="更多" />}
|
{<TagsWithHide list={notPassedResNameList} expandTagContent="更多" />}
|
||||||
</div>
|
</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,6 +224,7 @@ 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 (record?.updateTime) {
|
||||||
if (passed) {
|
if (passed) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -239,6 +240,9 @@ export const getDetailColumn = (clusterId: number) => [
|
|||||||
<TagsWithHide list={record.notPassedResNameList || []} expandTagContent="更多" />
|
<TagsWithHide list={record.notPassedResNameList || []} expandTagContent="更多" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user