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
94d3a15b
Commit
94d3a15b
authored
Sep 04, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DDL 下发结果详情
parent
ca8ae47a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
0 deletions
+127
-0
datamodel.js
src/model/datamodel.js
+5
-0
datamodeler.js
src/service/datamodeler.js
+5
-0
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+43
-0
upload-ddl-result.jsx
src/view/Manage/Model/Component/upload-ddl-result.jsx
+74
-0
No files found.
src/model/datamodel.js
View file @
94d3a15b
...
@@ -484,4 +484,8 @@ export function* getHiveStoredTypes() {
...
@@ -484,4 +484,8 @@ export function* getHiveStoredTypes() {
export
function
*
conceptualModelCreateDataModel
(
payload
)
{
export
function
*
conceptualModelCreateDataModel
(
payload
)
{
return
yield
call
(
datamodelerService
.
conceptualModelCreateDataModel
,
payload
)
return
yield
call
(
datamodelerService
.
conceptualModelCreateDataModel
,
payload
)
}
export
function
*
getUploadDDLResultDetails
(
payload
)
{
return
yield
call
(
datamodelerService
.
getUploadDDLResultDetails
,
payload
)
}
}
\ No newline at end of file
src/service/datamodeler.js
View file @
94d3a15b
...
@@ -440,4 +440,8 @@ export function getHiveStoredTypes() {
...
@@ -440,4 +440,8 @@ export function getHiveStoredTypes() {
export
function
conceptualModelCreateDataModel
(
payload
)
{
export
function
conceptualModelCreateDataModel
(
payload
)
{
return
PostJSON
(
"/datamodeler/easyDataModelerConceptualModeling/populdateDataModel"
,
payload
)
return
PostJSON
(
"/datamodeler/easyDataModelerConceptualModeling/populdateDataModel"
,
payload
)
}
export
function
getUploadDDLResultDetails
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerUploadDDLResult/getUploadDDLResultDetails"
,
payload
)
}
}
\ No newline at end of file
src/view/Manage/Model/Component/ModelTable.jsx
View file @
94d3a15b
...
@@ -12,6 +12,7 @@ import { showMessage, getQueryParam, paginate, isSzseEnv, formatDate } from '../
...
@@ -12,6 +12,7 @@ import { showMessage, getQueryParam, paginate, isSzseEnv, formatDate } from '../
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
// import Tag from "../../Tag";
// import Tag from "../../Tag";
import
IframeDrawer
from
'../../ModelConfig/Component/IframeDrawer'
;
import
IframeDrawer
from
'../../ModelConfig/Component/IframeDrawer'
;
import
UploadDDLResult
from
'./upload-ddl-result'
;
import
'./ModelTable.less'
;
import
'./ModelTable.less'
;
import
'react-contexify/dist/ReactContexify.css'
;
import
'react-contexify/dist/ReactContexify.css'
;
...
@@ -146,6 +147,10 @@ const ModelTable = (props) => {
...
@@ -146,6 +147,10 @@ const ModelTable = (props) => {
title
:
undefined
,
title
:
undefined
,
url
:
undefined
,
url
:
undefined
,
})
})
const
[
uploadDDLResultParams
,
setUploadDDLResultParams
]
=
useState
({
visible
:
false
,
id
:
undefined
,
})
const
cols
=
[
const
cols
=
[
{
{
...
@@ -210,6 +215,34 @@ const ModelTable = (props) => {
...
@@ -210,6 +215,34 @@ const ModelTable = (props) => {
}
}
},
},
{
{
title
:
'下发状态'
,
dataIndex
:
'dataModelUploadDDLResult'
,
width
:
100
,
ellipsis
:
true
,
sorter
:
true
,
sortDirections
:
[
'ascend'
,
'descend'
],
render
:
(
text
,
record
,
__
)
=>
{
return
(
<
Tooltip
title=
{
record
.
dataModelUploadDDLResult
?.
resultType
?.
name
}
overlayClassName=
'tooltip-common'
>
<
Text
ellipsis=
{
true
}
>
{
record
.
dataModelUploadDDLResult
?.
viewDetails
?
<
a
onClick=
{
()
=>
{
setUploadDDLResultParams
({
visible
:
true
,
id
:
record
.
id
,
})
}
}
>
{
record
.
dataModelUploadDDLResult
?.
resultType
?.
name
}
</
a
>
:
<>
{
record
.
dataModelUploadDDLResult
?.
resultType
?.
name
}
</>
}
</
Text
>
</
Tooltip
>
);
}
},
{
title
:
'创建人'
,
title
:
'创建人'
,
dataIndex
:
'editor'
,
dataIndex
:
'editor'
,
width
:
100
,
width
:
100
,
...
@@ -829,6 +862,16 @@ const ModelTable = (props) => {
...
@@ -829,6 +862,16 @@ const ModelTable = (props) => {
})
})
}
}
}
}
/>
/>
<
UploadDDLResult
{
...
uploadDDLResultParams
}
onCancel=
{
()
=>
{
setUploadDDLResultParams
({
visible
:
false
,
id
:
undefined
,
})
}
}
/>
{
contextHolder
}
{
contextHolder
}
</
div
>
</
div
>
);
);
...
...
src/view/Manage/Model/Component/upload-ddl-result.jsx
0 → 100644
View file @
94d3a15b
import
React
from
'react'
import
{
Modal
,
Spin
,
Descriptions
}
from
'antd'
import
{
dispatch
}
from
'../../../../model'
const
FC
=
(
props
)
=>
{
const
{
visible
,
id
,
onCancel
}
=
props
const
[
waiting
,
setWaiting
]
=
React
.
useState
(
false
)
const
[
data
,
setData
]
=
React
.
useState
()
React
.
useEffect
(()
=>
{
if
(
visible
&&
id
)
{
getDetail
()
}
},
[
visible
,
id
])
const
getDetail
=
()
=>
{
setWaiting
(
true
)
dispatch
({
type
:
'datamodel.getUploadDDLResultDetails'
,
payload
:
{
easyDataModelerDataModelId
:
id
,
},
callback
:
(
data
)
=>
{
setWaiting
(
false
)
setData
(
data
)
},
error
:
()
=>
{
setWaiting
(
false
)
}
})
}
const
close
=
()
=>
{
setData
()
onCancel
?.()
}
return
(
<
Modal
visible=
{
visible
}
footer=
{
null
}
width=
'80%'
bodyStyle=
{
{
padding
:
'15px'
,
overflowX
:
'auto'
,
height
:
'80vh'
}
}
title=
'DDL下发结果详情'
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
<
Spin
spinning=
{
waiting
}
>
<
Descriptions
size=
'small'
column=
{
1
}
>
<
Descriptions
.
Item
label=
'下发DDL语句'
>
{
(
data
?.
ddl
??
''
).
split
(
'
\
n'
).
map
((
text
,
index
)
=>
<>
{
index
!==
0
&&
<
br
/>
}
{
text
}
</>)
}
</
Descriptions
.
Item
>
{
data
?.
success
===
false
&&
<
Descriptions
.
Item
label=
'失败原因'
>
{
data
?.
errorMsg
}
</
Descriptions
.
Item
>
}
<
Descriptions
.
Item
label=
'下发时间'
>
{
data
?.
updateTs
?
new
Date
(
data
?.
updateTs
).
toLocaleString
()
:
''
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Spin
>
</
Modal
>
)
}
export
default
FC
\ No newline at end of file
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