|
@@ -14,14 +14,12 @@
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/
|
|
|
-import { computed } from 'vue'
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
import { useCustomParams } from '.'
|
|
|
import type { IJsonItem } from '../types'
|
|
|
|
|
|
export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
|
|
const { t } = useI18n()
|
|
|
- const timeoutSpan = computed(() => (model.timeoutSetting ? 12 : 0))
|
|
|
|
|
|
const HTTP_CHECK_CONDITIONS = [
|
|
|
{
|
|
@@ -140,16 +138,11 @@ export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
|
|
placeholder: t('project.node.http_condition_tips')
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- type: 'switch',
|
|
|
- field: 'timeoutSetting',
|
|
|
- name: t('project.node.timeout_settings')
|
|
|
- },
|
|
|
{
|
|
|
type: 'input-number',
|
|
|
field: 'connectTimeout',
|
|
|
name: t('project.node.connect_timeout'),
|
|
|
- span: timeoutSpan,
|
|
|
+ span: 12,
|
|
|
props: {
|
|
|
max: Math.pow(7, 10) - 1
|
|
|
},
|
|
@@ -172,7 +165,7 @@ export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
|
|
type: 'input-number',
|
|
|
field: 'socketTimeout',
|
|
|
name: t('project.node.socket_timeout'),
|
|
|
- span: timeoutSpan,
|
|
|
+ span: 12,
|
|
|
props: {
|
|
|
max: Math.pow(7, 10) - 1
|
|
|
},
|