Commit f7708f53 authored by 皮倩雯's avatar 皮倩雯

fix: '修改数据库连接配置界面样式'

parent 86489883
Pipeline #42620 skipped with stages
......@@ -60,7 +60,7 @@ const GlobalHeaderRight = props => {
文档说明
</a>
</div>
<Colophon />
{/* <Colophon /> */}
<div style={{ margin: '0 10px' }}>
<a
target="_blank"
......
......@@ -48,16 +48,16 @@ const DatabaseConnectConfig = props => {
</TabPane>
))}
</Tabs> */}
<Hr />
<SQLServerTable />
<br />
<Hr />
<OracleTable />
<br />
<Hr />
<MongDBTable />
<br />
<Hr />
<MySQLTable />
</Card>
</PageContainer>
......
......@@ -7,7 +7,7 @@ import {
getMongoDBConnectionTest,
GetConnString,
DeleteConnString,
GetConnTest
GetConnTest,
} from '@/services/database/api';
import AddModal from './AddModal';
const MongDBTable = props => {
......@@ -34,11 +34,12 @@ const MongDBTable = props => {
// setTableLoading(false);
// });
GetConnString({
Type:"MongoDB"
}).then(resnew => {
Type: 'MongoDB',
})
.then(resnew => {
setTableLoading(false);
if (resnew.code == 0) {
let res = resnew.data
let res = resnew.data;
setDataList(res);
}
})
......@@ -80,9 +81,10 @@ const MongDBTable = props => {
// console.error(err);
// });
GetConnTest({
Type:"MongoDB",
name:item.name
}).then(res => {
Type: 'MongoDB',
name: item.name,
})
.then(res => {
setTableLoading(false);
if (res.code == 0) {
notification.success({
......@@ -102,7 +104,6 @@ const MongDBTable = props => {
setTableLoading(false);
console.error(err);
});
};
// 删除
const handleDel = (val, item) => {
......@@ -130,7 +131,7 @@ const MongDBTable = props => {
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
name,
}).then(res => {
setFlag(flag + 1);
if (res.code == 0) {
......@@ -146,7 +147,7 @@ const MongDBTable = props => {
description: res.msg || '删除失败',
});
}
})
});
};
// 编辑
const handleEdit = (val, item) => {
......@@ -222,11 +223,7 @@ const MongDBTable = props => {
key: 'options',
width: 300,
render: (val, item) => [
<Button
size="small"
type="primary"
onClick={() => handleCon(val, item)}
>
<Button size="small" type="primary" onClick={() => handleCon(val, item)}>
测试连接
</Button>,
<Button
......@@ -265,7 +262,7 @@ const MongDBTable = props => {
bordered
loading={tableLoading}
dataSource={dataList}
options={{ reload: false, fullScreen: false }}
options={false}
toolBarRender={() => [
<Button
type="primary"
......
......@@ -7,7 +7,7 @@ import {
deleteConnString,
GetConnString,
DeleteConnString,
GetConnTest
GetConnTest,
} from '@/services/database/api';
import AddModal from './AddModal';
const MySQLTable = props => {
......@@ -34,11 +34,12 @@ const MySQLTable = props => {
// setTableLoading(false);
// });
GetConnString({
Type:"MySQL"
}).then(resnew => {
Type: 'MySQL',
})
.then(resnew => {
setTableLoading(false);
if (resnew.code == 0) {
let res = resnew.data
let res = resnew.data;
setDataList(res);
}
})
......@@ -80,9 +81,10 @@ const MySQLTable = props => {
// console.error(err);
// });
GetConnTest({
Type:"MySQL",
name:item.name
}).then(res => {
Type: 'MySQL',
name: item.name,
})
.then(res => {
setTableLoading(false);
if (res.code == 0) {
notification.success({
......@@ -129,7 +131,7 @@ const MySQLTable = props => {
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
name,
}).then(res => {
setFlag(flag + 1);
if (res.code == 0) {
......@@ -145,7 +147,7 @@ const MySQLTable = props => {
description: res.msg || '删除失败',
});
}
})
});
};
// 编辑
const handleEdit = (val, item) => {
......@@ -198,11 +200,7 @@ const MySQLTable = props => {
key: 'options',
width: 300,
render: (val, item) => [
<Button
size="small"
type="primary"
onClick={() => handleCon(val, item)}
>
<Button size="small" type="primary" onClick={() => handleCon(val, item)}>
测试连接
</Button>,
<Button
......@@ -241,7 +239,7 @@ const MySQLTable = props => {
bordered
loading={tableLoading}
dataSource={dataList}
options={{ reload: false, fullScreen: false }}
options={false}
toolBarRender={() => [
<Button
type="primary"
......
......@@ -7,7 +7,7 @@ import {
deleteConnString,
GetConnString,
DeleteConnString,
GetConnTest
GetConnTest,
} from '@/services/database/api';
import AddModal from './AddModal';
const OracleTable = props => {
......@@ -34,11 +34,12 @@ const OracleTable = props => {
// setTableLoading(false);
// });
GetConnString({
Type:"Oracle"
}).then(resnew => {
Type: 'Oracle',
})
.then(resnew => {
setTableLoading(false);
if (resnew.code == 0) {
let res = resnew.data
let res = resnew.data;
setDataList(res);
}
})
......@@ -80,9 +81,10 @@ const OracleTable = props => {
// console.error(err);
// });
GetConnTest({
Type:"Oracle",
name:item.name
}).then(res => {
Type: 'Oracle',
name: item.name,
})
.then(res => {
setTableLoading(false);
if (res.code == 0) {
notification.success({
......@@ -129,7 +131,7 @@ const OracleTable = props => {
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
name,
}).then(res => {
setFlag(flag + 1);
if (res.code == 0) {
......@@ -145,7 +147,7 @@ const OracleTable = props => {
description: res.msg || '删除失败',
});
}
})
});
};
// 编辑
const handleEdit = (val, item) => {
......@@ -191,11 +193,7 @@ const OracleTable = props => {
key: 'options',
width: 300,
render: (val, item) => [
<Button
size="small"
type="primary"
onClick={() => handleCon(val, item)}
>
<Button size="small" type="primary" onClick={() => handleCon(val, item)}>
测试连接
</Button>,
<Button
......@@ -234,7 +232,7 @@ const OracleTable = props => {
bordered
loading={tableLoading}
dataSource={dataList}
options={{ reload: false, fullScreen: false }}
options={false}
toolBarRender={() => [
<Button
type="primary"
......
import React, { useEffect, useState } from 'react';
import ProTable from '@ant-design/pro-table';
import { Button, Popconfirm, notification } from 'antd';
import {
getSQLServerConnString,
deleteConnString,
getSQLServerConnectionTest,
GetConnString,
DeleteConnString,
GetConnTest
} from '@/services/database/api';
import { GetConnString, DeleteConnString, GetConnTest } from '@/services/database/api';
import AddModal from './AddModal';
const SQLServerTable = props => {
const [flag, setFlag] = useState(1);
......@@ -34,11 +27,12 @@ const SQLServerTable = props => {
// setTableLoading(false);
// });
GetConnString({
Type:"SQLServer"
}).then(resnew => {
Type: 'SQLServer',
})
.then(resnew => {
setTableLoading(false);
if (resnew.code == 0) {
let res = resnew.data
let res = resnew.data;
setDataList(res);
}
})
......@@ -80,9 +74,10 @@ const SQLServerTable = props => {
// console.error(err);
// });
GetConnTest({
Type:"SQLServer",
name:item.name
}).then(res => {
Type: 'SQLServer',
name: item.name,
})
.then(res => {
setTableLoading(false);
if (res.code == 0) {
notification.success({
......@@ -129,7 +124,7 @@ const SQLServerTable = props => {
// })
// .catch(err => console.error(err));
DeleteConnString({
name:name
name,
}).then(res => {
setFlag(flag + 1);
if (res.code == 0) {
......@@ -145,7 +140,7 @@ const SQLServerTable = props => {
description: res.msg || '删除失败',
});
}
})
});
};
// 编辑
const handleEdit = (val, item) => {
......@@ -199,12 +194,7 @@ const SQLServerTable = props => {
key: 'options',
width: 300,
render: (val, item) => [
<Button
size="small"
type="primary"
onClick={() => handleCon(val, item)}
key="testLink"
>
<Button size="small" type="primary" onClick={() => handleCon(val, item)} key="testLink">
测试连接
</Button>,
<Button
......@@ -245,7 +235,7 @@ const SQLServerTable = props => {
bordered
loading={tableLoading}
dataSource={dataList}
options={{ reload: false, fullScreen: false }}
options={false}
toolBarRender={() => [
<Button
type="primary"
......
......@@ -163,7 +163,10 @@ const IotConfig = () => {
]}
>
<div style={{ display: 'flex', justifyContent: 'flex-start' }}>
<Input style={{ width: '300px', marginLeft: '15px' }} />
<Input
style={{ width: '300px', marginLeft: '15px' }}
placeholder="请输入服务地址"
/>
<span style={{ display: show1 }}>
<img
src={Yes}
......
......@@ -152,7 +152,10 @@ const MessageConfig = () => {
]}
>
<div style={{ display: 'flex', justifyContent: 'flex-start' }}>
<Input style={{ width: '300px', marginLeft: '15px' }} />
<Input
style={{ width: '300px', marginLeft: '15px' }}
placeholder="请输入服务地址"
/>
<span style={{ display: show1 }}>
<img
src={Yes}
......
......@@ -192,7 +192,7 @@ const ProxyConfig = () => {
},
]}
>
<Input style={{ marginLeft: '15px', width: '300px' }} />
<Input style={{ marginLeft: '15px', width: '300px' }} placeholder="请输入ngnix端口" />
</Form.Item>
<Form.Item
style={{ marginLeft: '20px' }}
......@@ -210,7 +210,7 @@ const ProxyConfig = () => {
]}
hasFeedback
>
<Input style={{ marginLeft: '34px', width: '300px' }} />
<Input style={{ marginLeft: '34px', width: '300px' }} placeholder="请输入IIS地址" />
</Form.Item>
<Form.Item
style={{ marginLeft: '20px' }}
......@@ -228,7 +228,7 @@ const ProxyConfig = () => {
},
]}
>
<Input style={{ marginLeft: '18px', width: '300px' }} />
<Input style={{ marginLeft: '18px', width: '300px' }} placeholder="请输入EMQ地址" />
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit" style={{ marginLeft: '130px' }}>
......
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