Fixed webhook
This commit is contained in:
@@ -801,7 +801,6 @@ const AngularWorkflow = (props) => {
|
||||
workflow.start = node.data('id')
|
||||
setWorkflow(workflow)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const onEdgeRemoved = (event) => {
|
||||
@@ -1642,8 +1641,6 @@ const AngularWorkflow = (props) => {
|
||||
}
|
||||
|
||||
newNodeId = uuid.v4()
|
||||
console.log(data)
|
||||
|
||||
const newposition = {
|
||||
"x": e.pageX-cycontainer.offsetLeft,
|
||||
"y": e.pageY-cycontainer.offsetTop,
|
||||
@@ -1671,6 +1668,10 @@ const AngularWorkflow = (props) => {
|
||||
position: newposition,
|
||||
}
|
||||
|
||||
if (data.trigger_type === "WEBHOOK") {
|
||||
newAppData.status = "running"
|
||||
}
|
||||
|
||||
// Can all the data be in here? hmm
|
||||
const nodeToBeAdded = {
|
||||
group: "nodes",
|
||||
@@ -1714,6 +1715,10 @@ const AngularWorkflow = (props) => {
|
||||
}
|
||||
|
||||
setWorkflow(workflow)
|
||||
if (data.trigger_type === "WEBHOOK") {
|
||||
newWebhook(newAppData)
|
||||
saveWorkflow(workflow)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,9 +575,26 @@ const Workflows = (props) => {
|
||||
var starttime = new Date(selectedExecution.started_at*1000)
|
||||
var endtime = new Date(selectedExecution.started_at*1000)
|
||||
|
||||
var parsedArgument = selectedExecution.execution_argument
|
||||
if (selectedExecution.execution_argument !== undefined && selectedExecution.execution_argument.length > 0) {
|
||||
parsedArgument = replaceAll(parsedArgument, " None", " \"None\"");
|
||||
}
|
||||
|
||||
const arg = selectedExecution.execution_argument !== undefined && selectedExecution.execution_argument.length > 0 ?
|
||||
<div>
|
||||
Argument: {selectedExecution.execution_argument}
|
||||
Execution argument: {(parsedArgument.startsWith("{") && parsedArgument.endsWith("}")) || (parsedArgument.startsWith("[{") && parsedArgument.endsWith("}]")) ?
|
||||
<div>
|
||||
<ReactJson
|
||||
src={JSON.parse(parsedArgument)}
|
||||
theme="solarized"
|
||||
collapsed={true}
|
||||
displayDataTypes={false}
|
||||
name={"Execution argument"}
|
||||
/>
|
||||
</div>
|
||||
:
|
||||
selectedExecution.execution_argument
|
||||
}
|
||||
</div>
|
||||
: null
|
||||
/*
|
||||
@@ -603,9 +620,6 @@ const Workflows = (props) => {
|
||||
<div>
|
||||
Finished: {endtime.toISOString()}
|
||||
</div>
|
||||
<div>
|
||||
Result: {selectedExecution.result}
|
||||
</div>
|
||||
<div>
|
||||
Last node: {selectedExecution.last_node}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user