Added subflow execution exploration button
This commit is contained in:
@@ -3135,9 +3135,19 @@ func handleExecution(id string, workflow Workflow, request *http.Request) (Workf
|
|||||||
|
|
||||||
// This one doesn't really matter.
|
// This one doesn't really matter.
|
||||||
log.Printf("[INFO] Running POST execution with body of length %d", len(string(body)))
|
log.Printf("[INFO] Running POST execution with body of length %d", len(string(body)))
|
||||||
|
|
||||||
|
if body[0] == 34 && body[len(body)-1] == 34 {
|
||||||
|
body = body[1 : len(body)-1]
|
||||||
|
}
|
||||||
if len(string(body)) < 50 {
|
if len(string(body)) < 50 {
|
||||||
|
//log.Println(body)
|
||||||
|
// String in string
|
||||||
|
//log.Println(body)
|
||||||
|
|
||||||
|
//if string(body)[0] == "\"" && string(body)[string(body)
|
||||||
log.Printf("Body: %s", string(body))
|
log.Printf("Body: %s", string(body))
|
||||||
}
|
}
|
||||||
|
|
||||||
var execution ExecutionRequest
|
var execution ExecutionRequest
|
||||||
err = json.Unmarshal(body, &execution)
|
err = json.Unmarshal(body, &execution)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -378,7 +378,20 @@ const AngularWorkflow = (props) => {
|
|||||||
if (responseJson.length > 0) {
|
if (responseJson.length > 0) {
|
||||||
// FIXME: Sort this by time
|
// FIXME: Sort this by time
|
||||||
setWorkflowExecutions(responseJson)
|
setWorkflowExecutions(responseJson)
|
||||||
|
|
||||||
|
const cursearch = typeof window === 'undefined' || window.location === undefined ? "" : window.location.search
|
||||||
|
const tmpView = new URLSearchParams(cursearch).get("execution_id")
|
||||||
|
if (tmpView !== undefined && tmpView !== null && tmpView.length > 0) {
|
||||||
|
//console.log("SHOW EXECUTION ", tmpView)
|
||||||
|
const execution = responseJson.find(data => data.execution_id === tmpView)
|
||||||
|
if (execution !== null && execution !== undefined) {
|
||||||
|
console.log("EXEC: ", execution)
|
||||||
|
setExecutionData(execution)
|
||||||
|
setExecutionModalView(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//alert.info("Loaded executions")
|
//alert.info("Loaded executions")
|
||||||
//setWorkflowExecutions(responseJson)
|
//setWorkflowExecutions(responseJson)
|
||||||
})
|
})
|
||||||
@@ -6635,7 +6648,11 @@ const AngularWorkflow = (props) => {
|
|||||||
/>
|
/>
|
||||||
{data.action.app_name === "shuffle-subflow" ?
|
{data.action.app_name === "shuffle-subflow" ?
|
||||||
<span>
|
<span>
|
||||||
TBD: Load subexecution result for
|
{validate.valid && data.action.parameters !== undefined && data.action.parameters !== null ?
|
||||||
|
<a href={`/workflows/${data.action.parameters[0].value}?view=executions&execution_id=${validate.result.execution_id}`} target="_blank" style={{textDecoration: "none", color: "#f85a3e"}}>See subflow execution</a>
|
||||||
|
:
|
||||||
|
"TBD: Load subexecution result for"
|
||||||
|
}
|
||||||
</span>
|
</span>
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user