mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix(assistant): After the assistant is embedded in DataEase, the query times out.
This commit is contained in:
@@ -84,6 +84,7 @@ const certificateForm = reactive(cloneDeep(defaultCertificateForm))
|
||||
|
||||
const defaultUrlForm = {
|
||||
endpoint: '',
|
||||
timeout: 10,
|
||||
encrypt: false,
|
||||
aes_key: '',
|
||||
aes_iv: '',
|
||||
@@ -342,6 +343,14 @@ const validateCertificate = (_: any, value: any, callback: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const validateTimeout = (_: any, value: any, callback: any) => {
|
||||
if (value === null) {
|
||||
callback(new Error(t('datasource.please_enter') + t('common.empty') + t('ds.form.timeout')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
const urlRules = {
|
||||
endpoint: [
|
||||
{
|
||||
@@ -350,6 +359,13 @@ const urlRules = {
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
timeout: [
|
||||
{
|
||||
required: true,
|
||||
validator: validateTimeout,
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
certificate: [
|
||||
{
|
||||
required: true,
|
||||
@@ -799,6 +815,15 @@ const saveHandler = () => {
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('ds.form.timeout')" prop="timeout">
|
||||
<el-input-number
|
||||
v-model="urlForm.timeout"
|
||||
clearable
|
||||
:min="0"
|
||||
:max="300"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="AES" class="custom-require">
|
||||
<template #label>
|
||||
<span class="custom-require_danger">{{ t('embedded.aes_enable') }}</span>
|
||||
|
||||
Reference in New Issue
Block a user