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
f3e2e3bd
Commit
f3e2e3bd
authored
May 10, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持hive
parent
f966f357
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
9 deletions
+77
-9
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+1
-1
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+27
-6
hive-partition-add-key.jsx
src/view/Manage/Model/Component/hive-partition-add-key.jsx
+49
-2
No files found.
src/view/Manage/Model/Component/ImportAction.jsx
View file @
f3e2e3bd
...
@@ -519,7 +519,7 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -519,7 +519,7 @@ const ImportAction = React.forwardRef((props, ref) => {
let newPartition = {...(newModelerData.partition||{})};
let newPartition = {...(newModelerData.partition||{})};
if (newModelerData.dbType === 'Hive') {
if (newModelerData.dbType === 'Hive') {
newPartition.keys = (newPartition.keys??[]).filter(item => (newModelerData.easyDataModelerDataModelAttributes??[]).findIndex(_item => item.
iid === _item.iid
) === -1)
newPartition.keys = (newPartition.keys??[]).filter(item => (newModelerData.easyDataModelerDataModelAttributes??[]).findIndex(_item => item.
name === _item.name
) === -1)
} else {
} else {
newPartition.keys = (newPartition.keys??[]).filter(item => (newModelerData.easyDataModelerDataModelAttributes??[]).findIndex(_item => item.iid === _item.iid) !== -1)
newPartition.keys = (newPartition.keys??[]).filter(item => (newModelerData.easyDataModelerDataModelAttributes??[]).findIndex(_item => item.iid === _item.iid) !== -1)
}
}
...
...
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
f3e2e3bd
...
@@ -9,6 +9,7 @@ import { dispatch, dispatchLatest } from '../../../../model';
...
@@ -9,6 +9,7 @@ import { dispatch, dispatchLatest } from '../../../../model';
import
Rule
from
'../../ModelConfig/Component/rule-readonly'
;
import
Rule
from
'../../ModelConfig/Component/rule-readonly'
;
import
DebounceInput
from
'./DebounceInput'
;
import
DebounceInput
from
'./DebounceInput'
;
import
HivePartitionAddKey
from
'./hive-partition-add-key'
;
import
HivePartitionAddKey
from
'./hive-partition-add-key'
;
import
{
Detail
as
KeysDetail
}
from
'./hive-partition-add-key'
;
import
'./ImportActionHeader.less'
;
import
'./ImportActionHeader.less'
;
...
@@ -286,7 +287,11 @@ const ImportActionHeader = (props) => {
...
@@ -286,7 +287,11 @@ const ImportActionHeader = (props) => {
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
{
{
editable
?
<
DistributionItem
modelerData=
{
modelerData
}
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
distributionDescription
,
terms
)
}
</
span
>
editable
?
<
DistributionItem
modelerData=
{
modelerData
}
/>
:
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
KeysDetail
value=
{
modelerData
?.
distributionKey
?.
keys
}
/>
}
>
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
distributionDescription
,
terms
)
}
</
span
>
</
Tooltip
>
}
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -297,7 +302,11 @@ const ImportActionHeader = (props) => {
...
@@ -297,7 +302,11 @@ const ImportActionHeader = (props) => {
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
{
{
editable
?
<
PartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
supportedPartitionTypes
}
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
partitionsDescription
,
terms
)
}
</
span
>
editable
?
<
PartitionSelect
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
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -308,7 +317,11 @@ const ImportActionHeader = (props) => {
...
@@ -308,7 +317,11 @@ const ImportActionHeader = (props) => {
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
{
{
editable
?
<
AttributesSelect
modelerData=
{
modelerData
}
mode=
'tags'
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
semiPrimaryDescription
,
terms
)
}
</
span
>
editable
?
<
AttributesSelect
modelerData=
{
modelerData
}
mode=
'tags'
/>
:
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
KeysDetail
value=
{
modelerData
?.
easyDataModelerSemiPrimaryKey
}
/>
}
>
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
semiPrimaryDescription
,
terms
)
}
</
span
>
</
Tooltip
>
}
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -398,7 +411,11 @@ const ImportActionHeader = (props) => {
...
@@ -398,7 +411,11 @@ const ImportActionHeader = (props) => {
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
{
{
editable
?
<
HivePartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
supportedPartitionTypes
}
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
partitionsDescription
,
terms
)
}
</
span
>
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
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -427,7 +444,12 @@ const ImportActionHeader = (props) => {
...
@@ -427,7 +444,12 @@ const ImportActionHeader = (props) => {
]
}
]
}
>
>
{
{
editable
?
<
DistributionBucketItem
modelerData=
{
modelerData
}
/>
:
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
distributionBucketDescription
,
terms
)
}
</
span
>
editable
?
<
DistributionBucketItem
modelerData=
{
modelerData
}
/>
:
<
Tooltip
overlayClassName=
'tooltip-common'
title=
{
<
KeysDetail
value=
{
modelerData
?.
distributionKey
?.
keys
}
/>
}
>
<
span
className=
'word-wrap'
>
{
highlightSearchContentByTerms
(
distributionBucketDescription
,
terms
)
}
</
span
>
</
Tooltip
>
}
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -1095,7 +1117,6 @@ const HivePartitionSelect = ({ value, onChange, partitionTypes, modelerData }) =
...
@@ -1095,7 +1117,6 @@ const HivePartitionSelect = ({ value, onChange, partitionTypes, modelerData }) =
}
}
}
}
}
}
open=
{
false
}
open=
{
false
}
style=
{
{
width
:
300
}
}
value=
{
(
value
?.
keys
??[]).
map
(
item
=>
item
.
iid
)
}
value=
{
(
value
?.
keys
??[]).
map
(
item
=>
item
.
iid
)
}
options=
{
(
value
?.
keys
??[]).
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
iid
}))
}
options=
{
(
value
?.
keys
??[]).
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
iid
}))
}
allowClear
allowClear
...
...
src/view/Manage/Model/Component/hive-partition-add-key.jsx
View file @
f3e2e3bd
...
@@ -274,4 +274,51 @@ const Basic = React.forwardRef(function ({ modelerData, value }, ref) {
...
@@ -274,4 +274,51 @@ const Basic = React.forwardRef(function ({ modelerData, value }, ref) {
/>
/>
</>
</>
)
)
})
})
\ No newline at end of file
export
const
Detail
=
({
value
})
=>
{
const
columns
=
[
{
title
:
'中文名称'
,
dataIndex
:
'cnName'
,
},
{
title
:
'英文名称'
,
dataIndex
:
'name'
,
},
{
title
:
'类型'
,
dataIndex
:
'datatype'
,
render
:
(
_
,
record
,
__
)
=>
{
if
(
record
?.
datatype
)
{
if
((
record
?.
datatype
?.
name
===
'Char'
||
record
?.
datatype
?.
name
===
'Varchar'
)
&&
record
?.
datatype
?.
parameterValues
?.
length
>
0
)
{
return
`
${
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)})
`;
} else if ((record?.datatype?.name==='Decimal'||record?.datatype?.name==='Numeric') && record?.datatype?.parameterValues?.length>1) {
return `
$
{
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)},
$
{(
record
?.
datatype
?.
parameterValues
[
1
]?
record
.
datatype
.
parameterValues
[
1
]:
0
)})
`;
}
return record.datatype.name||'';
}
return '';
}
},
{
title: '业务含义',
dataIndex: 'remark',
},
]
return (
<div style={{ width: 500, maxHeight: 300, overflow: 'auto' }}>
<Table
columns={columns}
dataSource={value??[]}
pagination={false}
/>
</div>
)
}
\ 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