Skip to content
Merged
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
25 changes: 25 additions & 0 deletions frontend/src/views/system/embedded/iframe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const certificateForm = reactive(cloneDeep(defaultCertificateForm))

const defaultUrlForm = {
endpoint: '',
timeout: 10,
encrypt: false,
aes_key: '',
aes_iv: '',
Expand Down Expand Up @@ -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: [
{
Expand All @@ -350,6 +359,13 @@ const urlRules = {
trigger: 'blur',
},
],
timeout: [
{
required: true,
validator: validateTimeout,
trigger: 'change',
},
],
certificate: [
{
required: true,
Expand Down Expand Up @@ -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>
Expand Down