Skip to content

Commit 33565a2

Browse files
committed
fix(assistant): After the assistant is embedded in DataEase, the query times out.
1 parent 14e13d1 commit 33565a2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

frontend/src/views/system/embedded/iframe.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const certificateForm = reactive(cloneDeep(defaultCertificateForm))
8484
8585
const defaultUrlForm = {
8686
endpoint: '',
87+
timeout: 10,
8788
encrypt: false,
8889
aes_key: '',
8990
aes_iv: '',
@@ -342,6 +343,14 @@ const validateCertificate = (_: any, value: any, callback: any) => {
342343
}
343344
}
344345
346+
const validateTimeout = (_: any, value: any, callback: any) => {
347+
if (value === null) {
348+
callback(new Error(t('datasource.please_enter') + t('common.empty') + t('ds.form.timeout')))
349+
} else {
350+
callback()
351+
}
352+
}
353+
345354
const urlRules = {
346355
endpoint: [
347356
{
@@ -350,6 +359,13 @@ const urlRules = {
350359
trigger: 'blur',
351360
},
352361
],
362+
timeout: [
363+
{
364+
required: true,
365+
validator: validateTimeout,
366+
trigger: 'change',
367+
},
368+
],
353369
certificate: [
354370
{
355371
required: true,
@@ -799,6 +815,15 @@ const saveHandler = () => {
799815
autocomplete="off"
800816
/>
801817
</el-form-item>
818+
<el-form-item :label="t('ds.form.timeout')" prop="timeout">
819+
<el-input-number
820+
v-model="urlForm.timeout"
821+
clearable
822+
:min="0"
823+
:max="300"
824+
controls-position="right"
825+
/>
826+
</el-form-item>
802827
<el-form-item prop="AES" class="custom-require">
803828
<template #label>
804829
<span class="custom-require_danger">{{ t('embedded.aes_enable') }}</span>

0 commit comments

Comments
 (0)