Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 182 additions & 75 deletions backend/apps/db/db.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@
"address": "Address",
"low_version": "Compatible with lower versions",
"ssl": "Enable SSL",
"file_path": "File Path"
"file_path": "File Path",
"pool_size": "Connection Pool Size"
},
"sync_fields": "Sync Fields",
"sync_fields_success": "Sync fields successfully",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@
"address": "주소",
"low_version": "낮은 버전 호환",
"ssl": "SSL 활성화",
"file_path": "파일 경로"
"file_path": "파일 경로",
"pool_size": "연결 풀 크기"
},
"sync_fields": "동기화된 테이블 구조",
"sync_fields_success": "테이블 구조 동기화 성공",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@
"address": "地址",
"low_version": "兼容低版本",
"ssl": "启用 SSL",
"file_path": "文件路径"
"file_path": "文件路径",
"pool_size": "连接池大小"
},
"sync_fields": "同步表结构",
"sync_fields_success": "同步表结构成功",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@
"address": "位址",
"low_version": "相容低版本",
"ssl": "啟用 SSL",
"file_path": "文件路徑"
"file_path": "文件路徑",
"pool_size": "連線池大小"
},
"sync_fields": "同步表結構",
"sync_fields_success": "同步表結構成功",
Expand Down
27 changes: 25 additions & 2 deletions frontend/src/views/ds/DatasourceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const form = ref<any>({
timeout: 30,
lowVersion: false,
ssl: false,
poolSize: 5,
})

const close = () => {
Expand Down Expand Up @@ -177,6 +178,10 @@ const initForm = (item: any, editTable: boolean = false) => {
: true
form.value.ssl =
configuration.ssl !== null && configuration.ssl !== undefined ? configuration.ssl : false
form.value.poolSize =
configuration.poolSize !== null && configuration.poolSize !== undefined
? configuration.poolSize
: 5
}

if (editTable) {
Expand Down Expand Up @@ -250,6 +255,7 @@ const initForm = (item: any, editTable: boolean = false) => {
timeout: 30,
lowVersion: false,
ssl: false,
poolSize: 5,
}
}
dialogVisible.value = true
Expand Down Expand Up @@ -339,6 +345,7 @@ const buildConf = () => {
timeout: form.value.timeout,
lowVersion: form.value.lowVersion,
ssl: form.value.ssl,
poolSize: form.value.poolSize,
})
)
const obj = JSON.parse(JSON.stringify(form.value))
Expand All @@ -356,6 +363,7 @@ const buildConf = () => {
delete obj.timeout
delete obj.lowVersion
delete obj.ssl
delete obj.poolSize
return obj
}

Expand Down Expand Up @@ -659,7 +667,9 @@ defineExpose({
<el-input
v-model="form.filename"
clearable
:placeholder="$t('datasource.please_enter') + $t('common.empty') + t('ds.form.file_path')"
:placeholder="
$t('datasource.please_enter') + $t('common.empty') + t('ds.form.file_path')
"
/>
</el-form-item>
</div>
Expand Down Expand Up @@ -735,7 +745,11 @@ defineExpose({
>
<el-checkbox v-model="form.lowVersion" :label="t('ds.form.low_version')" />
</el-form-item>
<el-form-item v-if="form.type === 'mysql' || form.type === 'doris'" :label="t('ds.form.ssl')" prop="ssl">
<el-form-item
v-if="form.type === 'mysql' || form.type === 'doris'"
:label="t('ds.form.ssl')"
prop="ssl"
>
<el-switch v-model="form.ssl" />
</el-form-item>
<el-form-item v-if="form.type !== 'es'" :label="t('ds.form.extra_jdbc')">
Expand Down Expand Up @@ -781,6 +795,15 @@ defineExpose({
controls-position="right"
/>
</el-form-item>
<el-form-item v-if="form.type !== 'es'" :label="t('ds.form.pool_size')" prop="poolSize">
<el-input-number
v-model="form.poolSize"
clearable
:min="1"
:max="500"
controls-position="right"
/>
</el-form-item>
</div>
</el-form>
<div
Expand Down
Loading