10 changed files with 184 additions and 25 deletions
@ -0,0 +1,32 @@ |
|||||
|
import React, { useEffect, useState } from 'react' |
||||
|
import { Tabs, Card, Modal } from 'antd' |
||||
|
import AdapterStep from './adapterStep'; |
||||
|
import { BellOutlined } from '@ant-design/icons' |
||||
|
|
||||
|
function DataSourceModal(props) { |
||||
|
const { visible, editData, onFinish, onCancel } = props; |
||||
|
const [current, setCurrent] = useState(0); |
||||
|
// const onFinish = () => { }
|
||||
|
return <> |
||||
|
<Modal |
||||
|
title={editData ? '编辑数据源' : "新建数据源"} |
||||
|
onCancel={() => { onCancel() }} |
||||
|
open={visible} |
||||
|
footer={null} |
||||
|
width={1200} |
||||
|
destroyOnClose={true} |
||||
|
> |
||||
|
<div style={{ fontSize: 17 }}><BellOutlined />数据源基本信息</div> |
||||
|
<AdapterStep |
||||
|
type={'postgre'} //当前卡片的key (目前只有postgre,支持后续扩展)
|
||||
|
onFinish={onFinish} |
||||
|
stepProps={2} |
||||
|
currentChange={c => { setCurrent(c) }} |
||||
|
{...props} |
||||
|
/> |
||||
|
</Modal> |
||||
|
</> |
||||
|
|
||||
|
} |
||||
|
|
||||
|
export default DataSourceModal |
@ -0,0 +1,5 @@ |
|||||
|
//关系型数据库卡片配置
|
||||
|
export const RELATION_DATABASE_TOOL_CONFIG = [{ |
||||
|
key: 'postgre', // key与详情配置(adapterDetail)中的key需一直否则无法查看详情页
|
||||
|
name: 'PostgreSQL采集适配器', |
||||
|
}] |
Loading…
Reference in new issue