Commit 851bde60 by zhaochengxiang

jdbc后台配置

parent 883bf13b
{
"impala": {
"url": "",
"downloadUrl": "",
"urlTip": "复制地址",
"downloadTip": "下载驱动"
},
"hana": {
"url": "",
"downloadUrl": "",
"urlTip": "复制地址",
"downloadTip": "下载驱动"
}
}
\ No newline at end of file
...@@ -134,7 +134,7 @@ export function getAttrs(payload) { ...@@ -134,7 +134,7 @@ export function getAttrs(payload) {
} }
export function getJdbcInformation() { export function getJdbcInformation() {
return GetJSONRaw(`${ContextPath}/json/jdbc.json`); return GetJSON('/pdataservice/pdsDriver/url');
} }
export function subscribe(payload) { export function subscribe(payload) {
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Modal, Typography, Button, Space, Tooltip } from 'antd'; import { Modal, Typography, Button, Space, Tooltip, Spin } from 'antd';
import { CopyOutlined, DownloadOutlined } from '@ant-design/icons'; import { CopyOutlined, DownloadOutlined } from '@ant-design/icons';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
...@@ -9,6 +9,7 @@ import { showMessage } from '../../../../util'; ...@@ -9,6 +9,7 @@ import { showMessage } from '../../../../util';
const FC = (props) => { const FC = (props) => {
const { visible, onCancel } = props; const { visible, onCancel } = props;
const [information, setInformation] = useState(undefined); const [information, setInformation] = useState(undefined);
const [loading, setLoading] = useState(false);
useEffect(() => { useEffect(() => {
if (visible) { if (visible) {
...@@ -17,10 +18,15 @@ const FC = (props) => { ...@@ -17,10 +18,15 @@ const FC = (props) => {
}, [visible]) }, [visible])
const getInformation = () => { const getInformation = () => {
setLoading(true);
dispatch({ dispatch({
type: 'pds.getJdbcInformation', type: 'pds.getJdbcInformation',
callback: data => { callback: data => {
setLoading(false);
setInformation(data); setInformation(data);
},
error: () => {
setLoading(false);
} }
}) })
} }
...@@ -33,6 +39,7 @@ const FC = (props) => { ...@@ -33,6 +39,7 @@ const FC = (props) => {
onCancel={onCancel} onCancel={onCancel}
footer={null} footer={null}
> >
<Spin spinning={loading}>
<div className='flex mb-3' style={{ justifyContent: 'space-between', alignItems: 'baseline' }}> <div className='flex mb-3' style={{ justifyContent: 'space-between', alignItems: 'baseline' }}>
<div style={{ width: 400 }}> <div style={{ width: 400 }}>
<Typography.Text> <Typography.Text>
...@@ -83,6 +90,7 @@ const FC = (props) => { ...@@ -83,6 +90,7 @@ const FC = (props) => {
</Tooltip> </Tooltip>
</Space> </Space>
</div> </div>
</Spin>
</Modal> </Modal>
) )
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment