|
|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
|
import { Button, Space, Table, TableColumnProps } from '@arco-design/web-react';
|
|
|
|
|
import { Button, Space, Table, TableColumnProps, Tag } from '@arco-design/web-react';
|
|
|
|
|
import styles from '@/pages/componentDevelopment/componentDeployment/style/collapseList.module.less';
|
|
|
|
|
import { getInstanceList } from '@/api/componentInstance';
|
|
|
|
|
import { runStatusDic, runTypeConstant, runTypeDic } from '@/const/isdp/componentDeploy';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
|
|
|
|
|
interface ListNodeProps {
|
|
|
|
|
componentData: any; // 组件数据
|
|
|
|
|
@ -57,17 +59,28 @@ const ListNode: React.FC<ListNodeProps> = ({ componentData }) => {
|
|
|
|
|
{
|
|
|
|
|
title: '运行类型',
|
|
|
|
|
dataIndex: 'runType',
|
|
|
|
|
align: 'center'
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (runType) => {
|
|
|
|
|
const item = runTypeDic.find(d => d.value === runTypeConstant[runType]);
|
|
|
|
|
return item ? item.label : '-';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '运行状态',
|
|
|
|
|
dataIndex: 'runStatus',
|
|
|
|
|
align: 'center'
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (runStatus) => {
|
|
|
|
|
const item = runStatusDic.find(d => d.value === runStatus);
|
|
|
|
|
return item ? <Tag color={item.color}>{item.label}</Tag> : '-';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '创建时间',
|
|
|
|
|
dataIndex: 'createTime',
|
|
|
|
|
align: 'center'
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: (createTime) => {
|
|
|
|
|
return createTime ? dayjs(createTime).format('YYYY-MM-DD HH:mm:ss') : '-';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
|