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
dbb9830a
Commit
dbb9830a
authored
Jul 16, 2025
by
james
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取元数据namePathList
parent
534f49c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
4 deletions
+55
-4
szse.sh
deploy/szse.sh
+9
-0
util.sh
deploy/util.sh
+29
-0
metadata-compare-select-metadata.jsx
...nage/Model/Component/metadata-compare-select-metadata.jsx
+4
-2
metadata-compare.jsx
src/view/Manage/Model/Component/metadata-compare.jsx
+13
-2
No files found.
deploy/szse.sh
0 → 100755
View file @
dbb9830a
# yarn run build
Host
=
root@192.168.0.111
Dir
=
data-govern
Target
=
/var/www
source
$(
dirname
"
$0
"
)
/util.sh
deploy
$Host
$Dir
$Target
\ No newline at end of file
deploy/util.sh
0 → 100755
View file @
dbb9830a
BAK
=
${
1
:-
"nobak"
}
function
deploy
()
{
Host
=
$1
Dir
=
$2
Target
=
$3
echo
"
${
Host
}
\n
${
Dir
}
\n
${
Target
}
"
Now
=
$(
date +
"%F-%H-%M"
)
;
TmpDir
=
$Dir
-
$Now
scp
-r
./build
${
Host
}
:/tmp/
$TmpDir
ssh
-tt
$Host
<<
EOF
cd
${
Target
}
;
if [
$BAK
== "bak" ]; then
mv ./
$Dir
./
$TmpDir
else
rm -rf ./
${
Dir
}
fi
mv /tmp/
$TmpDir
./
$Dir
ls -l ./
exit # 显式退出远程会话
EOF
}
\ No newline at end of file
src/view/Manage/Model/Component/metadata-compare-select-metadata.jsx
View file @
dbb9830a
...
...
@@ -170,7 +170,7 @@ const Basic = React.forwardRef(function ({}, ref) {
modelPath
:
'Catalog,Database,Schema,Table'
,
sysId
:
args
.
node
?.
scopeId
,
reload
:
0
,
catalog
:
app
?.
env
?.
domainId
,
catalog
:
app
?.
env
?.
domainId
||
default_catalog
,
pageNum
:
pagination
.
page
,
pageSize
:
pagination
.
size
,
}
...
...
@@ -263,6 +263,8 @@ const Basic = React.forwardRef(function ({}, ref) {
)
})
const
default_catalog
=
1
export
const
MetadataTree
=
({
node
,
setNode
})
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
treeData
,
setTreeData
]
=
React
.
useState
()
...
...
@@ -279,7 +281,7 @@ export const MetadataTree = ({ node, setNode }) => {
dispatch
({
type
:
'assetmanage.getDatasources'
,
payload
:
{
catalog
:
app
?.
env
?.
domainId
,
catalog
:
app
?.
env
?.
domainId
||
default_catalog
,
},
callback
:
(
data
)
=>
{
setLoading
(
false
)
...
...
src/view/Manage/Model/Component/metadata-compare.jsx
View file @
dbb9830a
import
React
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Modal
,
Checkbox
,
Spin
,
Select
,
Row
,
Col
}
from
'antd'
import
{
CompareDetail
}
from
'./VersionCompare'
import
{
dispatch
}
from
'../../../../model'
import
{
AppContext
}
from
'../../../../App'
import
Axios
from
'axios'
const
FC
=
({
visible
,
leftItem
,
rightItem
,
onCancel
})
=>
{
const
close
=
()
=>
{
...
...
@@ -62,11 +63,21 @@ const Basic = ({ leftItem, rightItem }) => {
})
}
// 获取元数据namePathList
const
[
namePathList
,
set_namePathList
]
=
useState
()
useEffect
(()
=>
{
Axios
.
get
(
"/api/metadatarepo/rest/user/getById"
,
{
params
:{
id
:
leftItem
.
tableId
}
}).
then
((
data
)
=>
{
// console.log('namePathList', data.data?.namePathList);
const
namePathList
=
data
.
data
?.
namePathList
?.
splice
(
1
).
join
(
'/'
)
if
(
namePathList
)
set_namePathList
(
namePathList
)
})
},[
leftItem
])
return
(
<
div
className=
'model-version-compare'
>
<
div
className=
'flex'
>
<
div
style=
{
{
flex
:
1
,
paddingRight
:
10
,
overflow
:
'hidden'
}
}
>
<
span
>
{
`元数据:${leftItem?.path}/${
leftItem?.tableName
}`
}
</
span
>
<
span
>
{
`元数据:${leftItem?.path}/${
namePathList/* leftItem?.tableName */
}`
}
</
span
>
</
div
>
<
div
style=
{
{
flex
:
1
,
paddingLeft
:
10
,
overflow
:
'hidden'
}
}
>
<
Row
gutter=
{
10
}
>
...
...
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