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
0648f3d2
Commit
0648f3d2
authored
Jan 28, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据源管理问题
parent
44d72e0a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
32 deletions
+50
-32
index.jsx
src/view/Manage/DatasourceManage/index.jsx
+1
-1
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+1
-18
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+2
-2
SuggestTable.jsx
src/view/Manage/Model/Component/SuggestTable.jsx
+46
-11
No files found.
src/view/Manage/DatasourceManage/index.jsx
View file @
0648f3d2
...
...
@@ -72,7 +72,7 @@ const DatasourceManage = (props) => {
domain
.
value
=
domain
.
key
;
(
domain
.
children
||
[]).
forEach
(
system
=>
{
system
.
id
=
system
.
value
;
system
.
id
=
system
.
scopeId
;
system
.
value
=
system
.
key
;
})
})
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
0648f3d2
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
{
Input
,
Form
,
Typography
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
,
Table
,
Pagination
,
Space
}
from
'antd'
;
import
{
C
loseOutlined
,
C
heckOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
CheckOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
...
...
@@ -749,23 +749,6 @@ const ImportActionTable = (props) => {
return '';
}
},
// {
// title: '分布键',
// width: 60,
// dataIndex: 'partOfDistributionKey',
// editable: (type==='model'?true:false),
// render: (partOfDistributionKey, record, index) => {
// if (!partOfDistributionKey) {
// return '-';
// } else if (partOfDistributionKey === true) {
// return (
// <CheckOutlined />
// )
// }
// return '';
// }
// },
{
title: '外键',
width: 50,
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
0648f3d2
...
...
@@ -8,7 +8,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import
ResizeObserver
from
'rc-resize-observer'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
,
getTextLength
,
getTextWidth
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
}
from
'../../../../util'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
// import Tag from "../../Tag";
...
...
@@ -67,7 +67,7 @@ const ModelNameColumn = (props) => {
pagination=
{
false
}
size=
'small'
/>
</
div
>
</
div
>
;
}
return
(
...
...
src/view/Manage/Model/Component/SuggestTable.jsx
View file @
0648f3d2
...
...
@@ -38,6 +38,51 @@ const ResizeableHeaderCell = props => {
);
};
const
SourceComponent
=
(
props
)
=>
{
const
{
data
,
onClick
}
=
props
;
const
moreSourceComponent
=
<
div
style=
{
{
maxWidth
:
400
,
maxHeight
:
300
,
overflow
:
'auto'
}
}
>
{
(
data
||
[]).
map
((
source
,
index
)
=>
{
return
(
<
div
className=
'pointer'
key=
{
index
}
style=
{
{
textDecoration
:
'underline'
,
}
}
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
onClick
&&
onClick
(
source
.
sourceId
);
}
}
>
{
source
.
sourcePath
||
''
}
</
div
>
);
})
}
</
div
>;
return
(
<
Tooltip
title=
{
moreSourceComponent
}
overlayClassName=
'tooltip-common'
>
<
a
href=
'#'
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
onClick
&&
onClick
(
data
[
0
].
sourceId
);
}
}
>
{
(
data
||
[]).
length
>
0
&&
<
span
>
{
data
[
0
].
sourcePath
||
''
}
</
span
>
}
</
a
>
</
Tooltip
>
);
}
const
SuggestTable
=
(
props
)
=>
{
const
{
suggests
,
onSelect
}
=
props
;
...
...
@@ -110,19 +155,9 @@ const SuggestTable = (props) => {
{
title
:
'来源'
,
dataIndex
:
'source'
,
ellipsis
:
true
,
render
:
(
_
,
record
)
=>
{
return
(
<
Tooltip
title=
{
record
.
recommendedStats
?.
pathInSource
||
''
}
>
<
a
href=
'#'
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
sourceOnClick
(
record
.
recommendedStats
?.
idInSource
||
''
);
}
}
>
{
record
.
recommendedStats
?.
pathInSource
||
''
}
</
a
>
</
Tooltip
>
<
SourceComponent
data=
{
record
.
recommendedStats
?.
sourceInfos
||
[]
}
onClick=
{
sourceOnClick
}
/>
);
}
},
...
...
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