mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 01:38:11 +08:00
feat: ck 支持直连模式;es支持 6.*
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="form-item">
|
||||
<el-select v-model="mode" filterable :placeholder="$t('dataset.connect_mode')" size="mini">
|
||||
<el-option :label="$t('dataset.direct_connect')" value="0" :disabled="selectedDatasource.computeType==='EXTRACT'"/>
|
||||
<el-option :label="$t('dataset.sync_data')" value="1" :disabled="!kettleRunning || selectedDatasource.computeType==='DIRECT'" />
|
||||
<el-option :label="$t('dataset.direct_connect')" value="0" />
|
||||
<el-option :label="$t('dataset.sync_data')" value="1" :disabled="!kettleRunning || selectedDatasource.type==='es' || selectedDatasource.type==='ck'" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!param.tableId" class="form-item">
|
||||
<el-select v-model="mode" filterable :placeholder="$t('dataset.connect_mode')" size="mini">
|
||||
<el-option :label="$t('dataset.direct_connect')" value="0" :disabled="selectedDatasource.computeType==='EXTRACT'"/>
|
||||
<el-option :label="$t('dataset.sync_data')" value="1" :disabled="!kettleRunning || selectedDatasource.computeType==='DIRECT'" />
|
||||
<el-option :label="$t('dataset.direct_connect')" value="0" />
|
||||
<el-option :label="$t('dataset.sync_data')" value="1" :disabled="!kettleRunning || selectedDatasource.type==='es' || selectedDatasource.type==='ck'" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@@ -24,17 +24,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('datasource.data_mode')" prop="type">
|
||||
<el-select v-model="form.computeType" :placeholder="$t('datasource.please_choose_data_type')" class="select-width" :disabled="formType=='modify' || (formType==='add' && params && !!params.computeMode)">
|
||||
<el-option
|
||||
v-for="item in compute_mode"
|
||||
:key="item.type"
|
||||
:label="item.label"
|
||||
:value="item.type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.host')" prop="configuration.host">
|
||||
<el-input v-model="form.configuration.host" autocomplete="off" />
|
||||
</el-form-item>
|
||||
@@ -50,10 +39,10 @@
|
||||
<el-radio v-model="form.configuration.connectionType" label="serviceName">{{ $t('datasource.oracle_service_name') }}</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('datasource.user_name')" prop="configuration.username">
|
||||
<el-form-item :label="$t('datasource.user_name')" >
|
||||
<el-input v-model="form.configuration.username" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('datasource.password')" prop="configuration.password">
|
||||
<el-form-item :label="$t('datasource.password')" >
|
||||
<el-input v-model="form.configuration.password" autocomplete="off" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.port')" prop="configuration.port">
|
||||
@@ -164,14 +153,9 @@ export default {
|
||||
{ name: 'sqlServer', label: 'SQL Server', type: 'jdbc' },
|
||||
{ name: 'pg', label: 'PostgreSQL', type: 'jdbc' },
|
||||
{ name: 'es', label: 'Elasticsearch', type: 'es' },
|
||||
{ name: 'ch', label: 'ClickHouse', type: 'jdbc' }
|
||||
{ name: 'ck', label: 'ClickHouse', type: 'jdbc' }
|
||||
],
|
||||
schemas: [],
|
||||
compute_mode: [
|
||||
{type: "DIRECT", label: this.$t('datasource.direct')},
|
||||
{type: "EXTRACT", label: this.$t('datasource.extract')},
|
||||
{type: "ALL", label: this.$t('datasource.all_compute_mode')}
|
||||
],
|
||||
canEdit: false,
|
||||
originConfiguration: {}
|
||||
}
|
||||
@@ -222,6 +206,14 @@ export default {
|
||||
this.$refs.dsForm.resetFields()
|
||||
},
|
||||
save() {
|
||||
if(this.form.type !== 'es' && !this.form.configuration.username){
|
||||
this.$message.error(this.$t('datasource.please_input_user_name'))
|
||||
return
|
||||
}
|
||||
if(this.form.type !== 'es' && !this.form.configuration.username){
|
||||
this.$message.error(this.$t('datasource.please_input_password'))
|
||||
return
|
||||
}
|
||||
if (!this.form.configuration.schema && (this.form.type === 'oracle' || this.form.type === 'sqlServer')) {
|
||||
this.$message.error(this.$t('datasource.please_choose_schema'))
|
||||
return
|
||||
@@ -312,15 +304,6 @@ export default {
|
||||
this.form.configuration.dataSourceType = this.allTypes[i].type
|
||||
}
|
||||
}
|
||||
if(this.form.type === 'es'){
|
||||
this.compute_mode = [{type: "DIRECT", label: this.$t('datasource.direct')}];
|
||||
}else {
|
||||
this.compute_mode = [
|
||||
{type: "DIRECT", label: this.$t('datasource.direct')},
|
||||
{type: "EXTRACT", label: this.$t('datasource.extract')},
|
||||
{type: "ALL", label: this.$t('datasource.all_compute_mode')}
|
||||
];
|
||||
}
|
||||
},
|
||||
backToList() {
|
||||
this.$emit('switch-component', { })
|
||||
|
||||
Reference in New Issue
Block a user