Commit 93ded6b7 by zhaochengxiang

支持hive

parent f3e2e3bd
...@@ -287,11 +287,7 @@ const ImportActionHeader = (props) => { ...@@ -287,11 +287,7 @@ const ImportActionHeader = (props) => {
style={{ marginBottom }} style={{ marginBottom }}
> >
{ {
editable ? <DistributionItem modelerData={modelerData} /> : <Tooltip editable ? <DistributionItem modelerData={modelerData} /> : <span className='word-wrap'>{highlightSearchContentByTerms(distributionDescription, terms)}</span>
overlayClassName='tooltip-common'
title={<KeysDetail value={modelerData?.distributionKey?.keys} />}>
<span className='word-wrap'>{highlightSearchContentByTerms(distributionDescription, terms)}</span>
</Tooltip>
} }
</Form.Item> </Form.Item>
</Col> </Col>
...@@ -302,11 +298,7 @@ const ImportActionHeader = (props) => { ...@@ -302,11 +298,7 @@ const ImportActionHeader = (props) => {
style={{ marginBottom }} style={{ marginBottom }}
> >
{ {
editable ? <PartitionSelect modelerData={modelerData} partitionTypes={supportedPartitionTypes} /> : <Tooltip editable ? <PartitionSelect modelerData={modelerData} partitionTypes={supportedPartitionTypes} /> : <span className='word-wrap'>{highlightSearchContentByTerms(partitionsDescription, terms)}</span>
overlayClassName='tooltip-common'
title={<KeysDetail value={modelerData?.partition?.keys} />}>
<span className='word-wrap'>{highlightSearchContentByTerms(partitionsDescription, terms)}</span>
</Tooltip>
} }
</Form.Item> </Form.Item>
</Col> </Col>
...@@ -317,11 +309,7 @@ const ImportActionHeader = (props) => { ...@@ -317,11 +309,7 @@ const ImportActionHeader = (props) => {
style={{ marginBottom }} style={{ marginBottom }}
> >
{ {
editable ? <AttributesSelect modelerData={modelerData} mode='tags' /> : <Tooltip editable ? <AttributesSelect modelerData={modelerData} mode='tags' /> : <span className='word-wrap'>{highlightSearchContentByTerms(semiPrimaryDescription, terms)}</span>
overlayClassName='tooltip-common'
title={<KeysDetail value={modelerData?.easyDataModelerSemiPrimaryKey} />}>
<span className='word-wrap'>{highlightSearchContentByTerms(semiPrimaryDescription, terms)}</span>
</Tooltip>
} }
</Form.Item> </Form.Item>
</Col> </Col>
...@@ -426,17 +414,16 @@ const ImportActionHeader = (props) => { ...@@ -426,17 +414,16 @@ const ImportActionHeader = (props) => {
style={{ marginBottom }} style={{ marginBottom }}
rules={[ rules={[
{ {
required: true,
validator: (_, value) => { validator: (_, value) => {
if ((value?.keys??[]).length >0) { if ((value?.keys??[]).length >0) {
if (value?.bucketCount === 0) { if (value?.bucketCount === 0) {
return Promise.reject(new Error('分桶数不能为0')); return Promise.reject(new Error('分桶数不能为0!'));
} else if (!value?.bucketCount) { } else if (!value?.bucketCount) {
return Promise.reject(new Error('请输入分桶数')); return Promise.reject(new Error('请输入分桶数!'));
} }
} }
if (value?.bucketCount && (value?.keys??[]).length===0) { if (value?.bucketCount && (value?.keys??[]).length===0) {
return Promise.reject(new Error('请选择字段名称')); return Promise.reject(new Error('请选择字段名称!'));
} }
return Promise.resolve(); return Promise.resolve();
} }
...@@ -444,12 +431,7 @@ const ImportActionHeader = (props) => { ...@@ -444,12 +431,7 @@ const ImportActionHeader = (props) => {
]} ]}
> >
{ {
editable ? <DistributionBucketItem modelerData={modelerData} /> : editable ? <DistributionBucketItem modelerData={modelerData} /> : <span className='word-wrap'>{highlightSearchContentByTerms(distributionBucketDescription, terms)}</span>
<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>
...@@ -589,6 +571,8 @@ const ImportActionHeader = (props) => { ...@@ -589,6 +571,8 @@ const ImportActionHeader = (props) => {
} else { } else {
onChange?.({...changedValues, bindingLoadRange: ''}, {...allValues, bindingLoadRange: ''}); onChange?.({...changedValues, bindingLoadRange: ''}, {...allValues, bindingLoadRange: ''});
} }
} else if (changedValues.hasOwnProperty('dbType')) {
onChange?.({...changedValues, partition: null}, {...allValues, partition: null});
} }
} }
...@@ -605,7 +589,7 @@ const ImportActionHeader = (props) => { ...@@ -605,7 +589,7 @@ const ImportActionHeader = (props) => {
<Form.Item <Form.Item
label='数据库类型' label='数据库类型'
name="dbType" name="dbType"
rules={[{ required: true, message: '请输入中文名称!' }]} rules={[{ required: true, message: '请选择数据库类型!' }]}
style={{ marginBottom }} style={{ marginBottom }}
> >
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment