Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
851bde60
Commit
851bde60
authored
Jul 07, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jdbc后台配置
parent
883bf13b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
65 deletions
+58
-65
jdbc.json
public/json/jdbc.json
+0
-15
pds.js
src/service/pds.js
+1
-1
JDBCInformation.jsx
src/view/Manage/Model/Component/JDBCInformation.jsx
+57
-49
No files found.
public/json/jdbc.json
deleted
100644 → 0
View file @
883bf13b
{
"impala"
:
{
"url"
:
""
,
"downloadUrl"
:
""
,
"urlTip"
:
"复制地址"
,
"downloadTip"
:
"下载驱动"
},
"hana"
:
{
"url"
:
""
,
"downloadUrl"
:
""
,
"urlTip"
:
"复制地址"
,
"downloadTip"
:
"下载驱动"
}
}
\ No newline at end of file
src/service/pds.js
View file @
851bde60
...
...
@@ -134,7 +134,7 @@ export function getAttrs(payload) {
}
export
function
getJdbcInformation
()
{
return
GetJSON
Raw
(
`
${
ContextPath
}
/json/jdbc.json`
);
return
GetJSON
(
'/pdataservice/pdsDriver/url'
);
}
export
function
subscribe
(
payload
)
{
...
...
src/view/Manage/Model/Component/JDBCInformation.jsx
View file @
851bde60
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
copy
from
'copy-to-clipboard'
;
...
...
@@ -9,6 +9,7 @@ import { showMessage } from '../../../../util';
const
FC
=
(
props
)
=>
{
const
{
visible
,
onCancel
}
=
props
;
const
[
information
,
setInformation
]
=
useState
(
undefined
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
visible
)
{
...
...
@@ -17,10 +18,15 @@ const FC = (props) => {
},
[
visible
])
const
getInformation
=
()
=>
{
setLoading
(
true
);
dispatch
({
type
:
'pds.getJdbcInformation'
,
callback
:
data
=>
{
setLoading
(
false
);
setInformation
(
data
);
},
error
:
()
=>
{
setLoading
(
false
);
}
})
}
...
...
@@ -33,56 +39,58 @@ const FC = (props) => {
onCancel=
{
onCancel
}
footer=
{
null
}
>
<
div
className=
'flex mb-3'
style=
{
{
justifyContent
:
'space-between'
,
alignItems
:
'baseline'
}
}
>
<
div
style=
{
{
width
:
400
}
}
>
<
Typography
.
Text
>
{
`impala JDBC地址: ${information?.impala?.url}`
}
</
Typography
.
Text
>
<
Spin
spinning=
{
loading
}
>
<
div
className=
'flex mb-3'
style=
{
{
justifyContent
:
'space-between'
,
alignItems
:
'baseline'
}
}
>
<
div
style=
{
{
width
:
400
}
}
>
<
Typography
.
Text
>
{
`impala JDBC地址: ${information?.impala?.url}`
}
</
Typography
.
Text
>
</
div
>
<
Space
>
<
Tooltip
title=
{
information
?.
impala
?.
urlTip
}
>
<
Button
type=
'link'
icon=
{
<
CopyOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
impala
?.
url
)
{
copy
(
information
?.
impala
?.
url
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/>
</
Tooltip
>
<
Tooltip
title=
{
information
?.
impala
?.
downloadTip
}
>
<
Button
type=
'link'
icon=
{
<
DownloadOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
impala
?.
downloadUrl
)
{
copy
(
information
?.
impala
?.
downloadUrl
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/>
</
Tooltip
>
</
Space
>
</
div
>
<
Space
>
<
Tooltip
title=
{
information
?.
impala
?.
urlTip
}
>
<
Button
type=
'link'
icon=
{
<
CopyOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
impala
?.
url
)
{
copy
(
information
?.
impala
?.
url
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/
>
</
Tooltip
>
<
Tooltip
title=
{
information
?.
impala
?.
downloadTip
}
>
<
Button
type=
'link'
icon=
{
<
DownloadOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
impala
?.
downloadUrl
)
{
copy
(
information
?.
impala
?.
downloadUrl
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/
>
</
Tooltip
>
</
Space
>
</
div
>
<
div
className=
'flex'
style=
{
{
justifyContent
:
'space-between'
,
alignItems
:
'baseline'
}
}
>
<
div
style=
{
{
width
:
400
}
}
>
<
Typography
.
Text
>
{
`Hana JDBC地址: ${information?.hana?.url}`
}
</
Typography
.
Text
>
<
div
className=
'flex'
style=
{
{
justifyContent
:
'space-between'
,
alignItems
:
'baseline'
}
}
>
<
div
style=
{
{
width
:
400
}
}
>
<
Typography
.
Text
>
{
`Hana JDBC地址: ${information?.hana?.url}`
}
</
Typography
.
Text
>
</
div
>
<
Space
>
<
Tooltip
title=
{
information
?.
hana
?.
urlTip
}
>
<
Button
type=
'link'
icon=
{
<
CopyOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
hana
?.
url
)
{
copy
(
information
?.
hana
?.
url
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/>
</
Tooltip
>
<
Tooltip
title=
{
information
?.
hana
?.
downloadTip
}
>
<
Button
type=
'link'
icon=
{
<
DownloadOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
hana
?.
downloadUrl
)
{
copy
(
information
?.
hana
?.
downloadUrl
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/
>
</
Tooltip
>
</
Space
>
</
div
>
<
Space
>
<
Tooltip
title=
{
information
?.
hana
?.
urlTip
}
>
<
Button
type=
'link'
icon=
{
<
CopyOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
hana
?.
url
)
{
copy
(
information
?.
hana
?.
url
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/>
</
Tooltip
>
<
Tooltip
title=
{
information
?.
hana
?.
downloadTip
}
>
<
Button
type=
'link'
icon=
{
<
DownloadOutlined
/>
}
onClick=
{
()
=>
{
if
(
information
?.
hana
?.
downloadUrl
)
{
copy
(
information
?.
hana
?.
downloadUrl
);
showMessage
(
'success'
,
'复制成功'
);
}
}
}
/>
</
Tooltip
>
</
Space
>
</
div
>
</
Spin
>
</
Modal
>
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment