mirror of
https://github.com/dataease/dataease.git
synced 2026-05-24 06:18:10 +08:00
feat: 【数据源】用户可以通过JDBC连接字符串的配置连接到任意支持JDBC的数据库
This commit is contained in:
@@ -1150,7 +1150,8 @@ export default {
|
||||
please_input_acquire_increment: 'Please enter the growth number',
|
||||
please_input_connect_timeout: 'Please enter the connection timeout (seconds)',
|
||||
no_less_then_0: 'Parameters in advanced settings cannot be less than zero',
|
||||
priority: 'Advanced setting'
|
||||
priority: 'Advanced setting',
|
||||
extra_params: 'Extra JDBC connection string'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: 'Please enter the password to open the link',
|
||||
|
||||
@@ -1153,7 +1153,8 @@ export default {
|
||||
please_input_acquire_increment: '請輸入增長數',
|
||||
please_input_connect_timeout: '請輸入連接超時(秒)',
|
||||
no_less_then_0: '高級設置中的參數不能小于零',
|
||||
priority: '高級設置'
|
||||
priority: '高級設置',
|
||||
extra_params: '額外的JDBC連接字符串'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: '請輸入密碼打開鏈接',
|
||||
|
||||
@@ -1158,7 +1158,8 @@ export default {
|
||||
data_mode: '数据模式',
|
||||
direct: '直连模式',
|
||||
extract: '抽取模式',
|
||||
all_compute_mode: '直连、抽取模式'
|
||||
all_compute_mode: '直连、抽取模式',
|
||||
extra_params: '额外的JDBC连接字符串'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: '请输入密码打开链接',
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
<el-input v-model="form.configuration.esPassword" autocomplete="off" show-password />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc' && form.type!=='oracle'" :label="$t('datasource.extra_params')" >
|
||||
<el-input v-model="form.configuration.extraParams" autocomplete="off" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.port')" prop="configuration.port">
|
||||
<el-input v-model="form.configuration.port" autocomplete="off" />
|
||||
</el-form-item>
|
||||
@@ -155,14 +159,14 @@ export default {
|
||||
'configuration.connectTimeout': [{ required: true, message: this.$t('datasource.please_input_connect_timeout'), trigger: 'change' }]
|
||||
},
|
||||
allTypes: [
|
||||
{ name: 'mysql', label: 'MySQL', type: 'jdbc'},
|
||||
{ name: 'oracle', label: 'Oracle', type: 'jdbc' },
|
||||
{ name: 'sqlServer', label: 'SQL Server', type: 'jdbc' },
|
||||
{ name: 'pg', label: 'PostgreSQL', type: 'jdbc' },
|
||||
{ name: 'mysql', label: 'MySQL', type: 'jdbc', extraParams: 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true'},
|
||||
{ name: 'oracle', label: 'Oracle', type: 'jdbc'},
|
||||
{ name: 'sqlServer', label: 'SQL Server', type: 'jdbc', extraParams: ''},
|
||||
{ name: 'pg', label: 'PostgreSQL', type: 'jdbc', extraParams: '' },
|
||||
{ name: 'es', label: 'Elasticsearch', type: 'es' },
|
||||
{ name: 'mariadb', label: 'MariaDB', type: 'jdbc' },
|
||||
{ name: 'ds_doris', label: 'Doris', type: 'jdbc' },
|
||||
{ name: 'ck', label: 'ClickHouse', type: 'jdbc' }
|
||||
{ name: 'mariadb', label: 'MariaDB', type: 'jdbc', extraParams: 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' },
|
||||
{ name: 'ds_doris', label: 'Doris', type: 'jdbc', extraParams: 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' },
|
||||
{ name: 'ck', label: 'ClickHouse', type: 'jdbc', extraParams: '' }
|
||||
],
|
||||
schemas: [],
|
||||
canEdit: false,
|
||||
@@ -303,6 +307,7 @@ export default {
|
||||
for (let i = 0; i < this.allTypes.length; i++) {
|
||||
if (this.allTypes[i].name === this.form.type) {
|
||||
this.form.configuration.dataSourceType = this.allTypes[i].type
|
||||
this.form.configuration.extraParams = this.allTypes[i].extraParams
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user