forked from github/dataease
fix: 限制数据源端口号
This commit is contained in:
parent
2e57eb8768
commit
a4157ca8f2
@ -1154,6 +1154,7 @@ 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',
|
||||
port_no_less_then_0: 'Port cannot be less than zero',
|
||||
priority: 'Advanced setting',
|
||||
extra_params: 'Extra JDBC connection string'
|
||||
},
|
||||
|
@ -1157,6 +1157,7 @@ export default {
|
||||
please_input_acquire_increment: '請輸入增長數',
|
||||
please_input_connect_timeout: '請輸入連接超時(秒)',
|
||||
no_less_then_0: '高級設置中的參數不能小于零',
|
||||
port_no_less_then_0: '端口不能小於零',
|
||||
priority: '高級設置',
|
||||
extra_params: '額外的JDBC連接字符串'
|
||||
},
|
||||
|
@ -1158,6 +1158,7 @@ export default {
|
||||
please_input_acquire_increment: '请输入增长数',
|
||||
please_input_connect_timeout: '请输入连接超时(秒)',
|
||||
no_less_then_0: '高级设置中的参数不能小于零',
|
||||
port_no_less_then_0: '端口不能小于零',
|
||||
priority: '高级设置',
|
||||
data_mode: '数据模式',
|
||||
direct: '直连模式',
|
||||
|
@ -56,8 +56,8 @@
|
||||
<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 v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.port')" prop="configuration.port" >
|
||||
<el-input v-model="form.configuration.port" autocomplete="off" type="number" min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type=='oracle' || form.type=='sqlServer' || form.type=='pg'">
|
||||
<el-button icon="el-icon-plus" size="mini" @click="getSchema()">
|
||||
@ -225,6 +225,10 @@ export default {
|
||||
this.$message.error(this.$t('datasource.please_choose_schema'))
|
||||
return
|
||||
}
|
||||
if (this.form.configuration.dataSourceType === 'jdbc' && this.form.configuration.port <= 0) {
|
||||
this.$message.error(this.$t('datasource.port_no_less_then_0'))
|
||||
return
|
||||
}
|
||||
if (this.form.configuration.initialPoolSize < 0 || this.form.configuration.minPoolSize < 0 || this.form.configuration.maxPoolSize < 0 || this.form.configuration.maxIdleTime < 0 ||
|
||||
this.form.configuration.acquireIncrement < 0 || this.form.configuration.idleConnectionTestPeriod < 0 || this.form.configuration.connectTimeout < 0) {
|
||||
this.$message.error(this.$t('datasource.no_less_then_0'))
|
||||
|
Loading…
Reference in New Issue
Block a user