-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tsx
83 lines (79 loc) · 1.51 KB
/
.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import React from 'react';
import {
ActionType,
ModalForm,
PageContainer,
ProCard,
ProFormDependency,
ProFormGroup,
ProFormList,
ProFormSelect,
ProFormText,
ProTable,
} from '@alipay/tech-ui';
const = ({}: Props) => {
const column:any[] =[
{
title: '负载名称',
dataIndex: 'controllerName',
hideInTable: true,
},
{
title: '负载名称',
dataIndex: 'controllerName',
hideInTable: true,
},
{
title: '日期',
dataIndex: 'dateTime',
hideInTable: true,
render:(value)=>{
return moment(value)
}
},
{
title: '负载类型',
dataIndex: 'workloadKind',
hideInSearch: true,
valueEnum: {
CronJob: 'CronJob',
DaemonSet: 'DaemonSet',
Deployment: 'Deployment',
Job: 'Job',
},
render: (text: any, record: any) => {
return (
<Space>
{record.name}
</Space>
);
},
},
{
title: '操作',
dataIndex: 'operation',
render:(value)=>{
return <DrawerForm title="详情信息" trigger={<a>详情展示</a>}>
开发中
</DrawerForm>
}
},
]
return <ProTable
columns={column}
request={async (params) => {
const res = await fetchRecommendation({
cluster_id: props?.clusterID,
...params,
controllerKinds: params.controllerName,
});
return {
data: res?.data?.data ?? [],
success: true,
total: res?.data?.total ?? 0,
};
}}
options={false}
/>
};
export default ;