Commit d777184f authored by Joel's avatar Joel

feat: http run

parent 1653e5ee
......@@ -15,6 +15,7 @@ import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/compo
import { Settings01 } from '@/app/components/base/icons/src/vender/line/general'
import type { NodePanelProps } from '@/app/components/workflow/types'
import BeforeRunForm from '@/app/components/workflow/nodes/_base/components/before-run-form'
import ResultPanel from '@/app/components/workflow/run/result-panel'
const i18nPrefix = 'workflow.nodes.http'
......@@ -55,8 +56,11 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
varInputs,
inputVarValues,
setInputVarValues,
runResult,
} = useConfig(id, data)
// console.log(inputs)
return (
<div className='mt-2'>
<div className='px-4 pb-4 space-y-4'>
......@@ -67,6 +71,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
}
>
<VarList
nodeId={id}
readonly={readOnly}
list={inputs.variables}
onChange={handleVarListChange}
......@@ -173,6 +178,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
runningStatus={runningStatus}
onRun={handleRun}
onStop={handleStop}
result={<ResultPanel {...runResult} showSteps={false} />}
/>
)}
</div >
......
......@@ -75,6 +75,7 @@ const useConfig = (id: string, payload: HttpNodeType) => {
handleStop,
runInputData,
setRunInputData,
runResult,
} = useOneStepRun<HttpNodeType>({
id,
data: inputs,
......@@ -129,6 +130,7 @@ const useConfig = (id: string, payload: HttpNodeType) => {
varInputs,
inputVarValues,
setInputVarValues,
runResult,
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment