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 ...@@ -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 { Settings01 } from '@/app/components/base/icons/src/vender/line/general'
import type { NodePanelProps } from '@/app/components/workflow/types' import type { NodePanelProps } from '@/app/components/workflow/types'
import BeforeRunForm from '@/app/components/workflow/nodes/_base/components/before-run-form' 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' const i18nPrefix = 'workflow.nodes.http'
...@@ -55,8 +56,11 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({ ...@@ -55,8 +56,11 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
varInputs, varInputs,
inputVarValues, inputVarValues,
setInputVarValues, setInputVarValues,
runResult,
} = useConfig(id, data) } = useConfig(id, data)
// console.log(inputs)
return ( return (
<div className='mt-2'> <div className='mt-2'>
<div className='px-4 pb-4 space-y-4'> <div className='px-4 pb-4 space-y-4'>
...@@ -67,6 +71,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({ ...@@ -67,6 +71,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
} }
> >
<VarList <VarList
nodeId={id}
readonly={readOnly} readonly={readOnly}
list={inputs.variables} list={inputs.variables}
onChange={handleVarListChange} onChange={handleVarListChange}
...@@ -173,6 +178,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({ ...@@ -173,6 +178,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
runningStatus={runningStatus} runningStatus={runningStatus}
onRun={handleRun} onRun={handleRun}
onStop={handleStop} onStop={handleStop}
result={<ResultPanel {...runResult} showSteps={false} />}
/> />
)} )}
</div > </div >
......
...@@ -75,6 +75,7 @@ const useConfig = (id: string, payload: HttpNodeType) => { ...@@ -75,6 +75,7 @@ const useConfig = (id: string, payload: HttpNodeType) => {
handleStop, handleStop,
runInputData, runInputData,
setRunInputData, setRunInputData,
runResult,
} = useOneStepRun<HttpNodeType>({ } = useOneStepRun<HttpNodeType>({
id, id,
data: inputs, data: inputs,
...@@ -129,6 +130,7 @@ const useConfig = (id: string, payload: HttpNodeType) => { ...@@ -129,6 +130,7 @@ const useConfig = (id: string, payload: HttpNodeType) => {
varInputs, varInputs,
inputVarValues, inputVarValues,
setInputVarValues, 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