Added execution tracking when workflow finishes

This commit is contained in:
frikky
2020-10-02 04:13:25 +02:00
parent 5dac727441
commit 16a6bb2179
3 changed files with 13 additions and 1 deletions
+1
View File
@@ -3117,6 +3117,7 @@ func getSpecificWorkflow(resp http.ResponseWriter, request *http.Request) {
//} else {
// //log.Printf("Set cache for %s", item.Key)
//}
log.Println(workflow.IsValid)
resp.WriteHeader(200)
resp.Write(body)
+11 -1
View File
@@ -477,7 +477,6 @@ const AngularWorkflow = (props) => {
if (responseJson.status === "ABORTED" || responseJson.status === "STOPPED" || responseJson.status === "FAILURE") {
stop()
setExecutionRunning(false)
var curelements = cy.elements()
for (var i = 0; i < curelements.length; i++) {
@@ -492,9 +491,12 @@ const AngularWorkflow = (props) => {
//curelements[i].removeClass('failure-highlight')
}
}
getWorkflowExecution(props.match.params.key)
} else if (responseJson.status === "FINISHED") {
setExecutionRunning(false)
stop()
getWorkflowExecution(props.match.params.key)
}
}
@@ -868,6 +870,14 @@ const AngularWorkflow = (props) => {
return response.json()
})
.then((responseJson) => {
// Not sure why this is necessary.
if (responseJson.isValid === undefined) {
responseJson.isValid = true
}
if (responseJson.errors === undefined) {
responseJson.errors = []
}
setWorkflow(responseJson)
setWorkflowDone(true)
})
+1
View File
@@ -57,6 +57,7 @@ export const GetParsedPaths = (inputdata, basekey) => {
if (typeof(value) === 'object') {
if (Array.isArray(value)) {
// Check if each item is object
console.log("VALUE: ", value)
parsedValues.push({"type": "object", "name": basekeyname, "autocomplete": `${basekey}.${key}`})
parsedValues.push({"type": "list", "name": `${basekeyname}${splitkey}list`, "autocomplete": `${basekey}.${key}.#`})