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
1db68649
Commit
1db68649
authored
May 10, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持hive
parent
fe8dc82a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
28 deletions
+36
-28
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+36
-28
No files found.
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
1db68649
...
...
@@ -90,6 +90,10 @@ const ImportActionHeader = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
modelerData
])
const
_pratitionTypes
=
React
.
useMemo
(()
=>
{
return
(
supportedPartitionTypes
||
[]).
filter
(
item
=>
(
item
.
supportedDBTypes
??[]).
indexOf
(
modelerData
?.
dbType
)
!==-
1
)
},
[
supportedPartitionTypes
,
modelerData
?.
dbType
])
//分布键
const
distributionDescription
=
useMemo
(()
=>
{
if
(
modelerData
&&
modelerData
.
distributionKey
)
{
...
...
@@ -291,17 +295,19 @@ const ImportActionHeader = (props) => {
}
</
Form
.
Item
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"分区键"
name=
"partition"
style=
{
{
marginBottom
}
}
>
{
editable
?
<
PartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
supportedPartitionTypes
}
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
partitionsDescription
,
terms
)
}
</
span
>
}
</
Form
.
Item
>
</
Col
>
{
(
_pratitionTypes
??[]).
length
>
0
&&
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"分区键"
name=
"partition"
style=
{
{
marginBottom
}
}
>
{
editable
?
<
PartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
_pratitionTypes
}
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
partitionsDescription
,
terms
)
}
</
span
>
}
</
Form
.
Item
>
</
Col
>
}
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"类主键"
...
...
@@ -392,21 +398,23 @@ const ImportActionHeader = (props) => {
}
</
Form
.
Item
>
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"分区键"
name=
"partition"
style=
{
{
marginBottom
}
}
>
{
editable
?
<
HivePartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
supportedPartitionTypes
}
/>
:
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
KeysDetail
value=
{
modelerData
?.
partition
?.
keys
}
/>
}
>
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
partitionsDescription
,
terms
)
}
</
span
>
</
Tooltip
>
}
</
Form
.
Item
>
</
Col
>
{
(
_pratitionTypes
??[]).
length
>
0
&&
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"分区键"
name=
"partition"
style=
{
{
marginBottom
}
}
>
{
editable
?
<
HivePartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
_pratitionTypes
}
/>
:
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
KeysDetail
value=
{
modelerData
?.
partition
?.
keys
}
/>
}
>
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
partitionsDescription
,
terms
)
}
</
span
>
</
Tooltip
>
}
</
Form
.
Item
>
</
Col
>
}
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"分桶字段"
...
...
@@ -1017,7 +1025,7 @@ const PartitionSelect = ({ value = {}, modelerData, partitionTypes = [], onChang
allowClear=
{
true
}
>
{
(
partitionTypes
||
[])
.
map
((
partitionType
,
index
)
=>
{
partitionTypes
?
.
map
((
partitionType
,
index
)
=>
{
return
(
<
Option
key=
{
partitionType
.
name
}
value=
{
partitionType
.
name
}
>
{
partitionType
.
cnName
}
</
Option
>
);
...
...
@@ -1080,7 +1088,7 @@ const HivePartitionSelect = ({ value, onChange, partitionTypes, modelerData }) =
allowClear=
{
true
}
>
{
(
partitionTypes
||
[])
.
map
((
partitionType
,
index
)
=>
{
partitionTypes
?
.
map
((
partitionType
,
index
)
=>
{
return
(
<
Option
key=
{
partitionType
.
name
}
value=
{
partitionType
.
name
}
>
{
partitionType
.
cnName
}
</
Option
>
);
...
...
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