feat: add support for request timeout settings in the HTTP request node. (#3854)

Co-authored-by: Yeuoly <admin@srmxy.cn>
This commit is contained in:
majian
2024-04-29 13:59:07 +08:00
committed by GitHub
parent 2f84d00300
commit 8f2ae51fe5
17 changed files with 286 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ import KeyValue from './components/key-value'
import EditBody from './components/edit-body'
import AuthorizationModal from './components/authorization'
import type { HttpNodeType } from './types'
import Timeout from './components/timeout'
import Field from '@/app/components/workflow/nodes/_base/components/field'
import Split from '@/app/components/workflow/nodes/_base/components/split'
import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'
@@ -40,6 +41,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
showAuthorization,
hideAuthorization,
setAuthorization,
setTimeout,
// single run
isShowSingleRun,
hideSingleRun,
@@ -112,6 +114,15 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
/>
</Field>
</div>
<Split />
<div className='px-4 pt-4 pb-4'>
<Timeout
nodeId={id}
readonly={readOnly}
payload={inputs.timeout}
onChange={setTimeout}
/>
</div>
{(isShowAuthorization && !readOnly) && (
<AuthorizationModal
isShow