|
|
@ -2,8 +2,8 @@ import React, { useEffect, useState } from 'react' |
|
|
|
import { Spin, Popconfirm, Tree, Row, Col, Button, Input, Table } from 'antd'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
|
|
|
|
|
const TreeNode = Tree.TreeNode; |
|
|
|
import moment from 'moment'; |
|
|
|
import './style.less'; |
|
|
|
function DataSourceManagement(props) { |
|
|
|
const { loading, clientHeight, actions, dispatch, dataSources, adapters } = props; |
|
|
|
const [pageSize, setPageSize] = useState(10); |
|
|
@ -52,7 +52,7 @@ function DataSourceManagement(props) { |
|
|
|
dataIndex: 'control', |
|
|
|
render: (text, record) => { |
|
|
|
const adapterInfo = adapters?.find(s => s.id == record?.adapter) |
|
|
|
return adapterInfo?.toolName |
|
|
|
return adapterInfo?.mode |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -65,11 +65,14 @@ function DataSourceManagement(props) { |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '修改时间', |
|
|
|
dataIndex: 'nullable', |
|
|
|
dataIndex: 'time', |
|
|
|
render: (text, record) => moment(record?.time).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '描述', |
|
|
|
dataIndex: 'description', |
|
|
|
ellipsis: true, |
|
|
|
search: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
@ -96,14 +99,15 @@ function DataSourceManagement(props) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
return <Spin spinning={loading}> |
|
|
|
<Row style={{ marginBottom: 16 }}> |
|
|
|
<Row className='protable-title'> |
|
|
|
<Col span={12}><Button type='primary'>新建</Button></Col> |
|
|
|
<Col span={12} style={{ textAlign: 'right' }}><Input |
|
|
|
value={searchValue} onChange={e => { setSearchValue(e.target.value) }} |
|
|
|
style={{ width: 220, marginRight: 15 }} placeholder="数据源名称" /><Button onClick={() => { queryData() }} type='primary'>查询</Button></Col> |
|
|
|
</Row> |
|
|
|
<Table |
|
|
|
<ProTable |
|
|
|
columns={columns} |
|
|
|
dateFormatter="string" |
|
|
|
search={false} |
|
|
|