#512: Fixed frontend mechanism for unselecting router conditions
This commit is contained in:
@@ -2,7 +2,7 @@ module main
|
||||
|
||||
go 1.15
|
||||
|
||||
replace github.com/shuffle/shuffle-shared => ../../../../git/shuffle-shared
|
||||
//replace github.com/shuffle/shuffle-shared => ../../../../git/shuffle-shared
|
||||
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
|
||||
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
|
||||
|
||||
@@ -21,7 +21,7 @@ require (
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/h2non/filetype v1.1.1
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.1.17
|
||||
github.com/shuffle/shuffle-shared v0.1.18
|
||||
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
|
||||
google.golang.org/api v0.58.0
|
||||
|
||||
@@ -849,7 +849,7 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
|
||||
var trigger shuffle.Trigger
|
||||
err = json.Unmarshal([]byte(actionResult.Result), &trigger)
|
||||
if err != nil {
|
||||
log.Printf("Failed unmarshaling actionresult for user input: %s", err)
|
||||
log.Printf("[WARNING] Failed unmarshaling actionresult for user input: %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -862,21 +862,21 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
|
||||
|
||||
err := handleUserInput(trigger, orgId, workflowExecution.Workflow.ID, workflowExecution.ExecutionId)
|
||||
if err != nil {
|
||||
log.Printf("Failed userinput handler: %s", err)
|
||||
log.Printf("[WARNING] Failed userinput handler: %s", err)
|
||||
actionResult.Result = fmt.Sprintf("Cloud error: %s", err)
|
||||
workflowExecution.Results = append(workflowExecution.Results, actionResult)
|
||||
workflowExecution.Status = "ABORTED"
|
||||
err = shuffle.SetWorkflowExecution(ctx, *workflowExecution, true)
|
||||
if err != nil {
|
||||
log.Printf("Failed to set execution during wait")
|
||||
log.Printf("[WARNING] Failed to set execution during wait: %s", err)
|
||||
} else {
|
||||
log.Printf("Successfully set the execution to waiting.")
|
||||
log.Printf("[INFO] Successfully set the execution %s to waiting.", workflowExecution.ExecutionId)
|
||||
}
|
||||
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Error: %s"}`, err)))
|
||||
} else {
|
||||
log.Printf("Successful userinput handler")
|
||||
log.Printf("[INFO] Successful userinput handler")
|
||||
resp.WriteHeader(200)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": true, "reason": "CLOUD IS DONE"}`)))
|
||||
|
||||
@@ -886,7 +886,7 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
|
||||
workflowExecution.Status = actionResult.Status
|
||||
err = shuffle.SetWorkflowExecution(ctx, *workflowExecution, true)
|
||||
if err != nil {
|
||||
log.Printf("Failed ")
|
||||
log.Printf("[WARNING] Failed setting userinput: %s", err)
|
||||
} else {
|
||||
log.Printf("Successfully set the execution to waiting.")
|
||||
}
|
||||
@@ -1995,7 +1995,7 @@ func getWorkflowApps(resp http.ResponseWriter, request *http.Request) {
|
||||
// Double unmarshal because of user apps
|
||||
newbody, err := json.Marshal(newapps)
|
||||
if err != nil {
|
||||
log.Printf("Failed unmarshalling all newapps: %s", err)
|
||||
log.Printf("[ERROR] Failed unmarshalling all newapps: %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Failed unpacking workflow apps"}`)))
|
||||
return
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ services:
|
||||
depends_on:
|
||||
- backend
|
||||
backend:
|
||||
build: ./backend
|
||||
#build: ./backend
|
||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
||||
container_name: shuffle-backend
|
||||
hostname: ${BACKEND_HOSTNAME}
|
||||
|
||||
@@ -1595,6 +1595,19 @@ const AngularWorkflow = (props) => {
|
||||
if (event.target.data().decorator) {
|
||||
alert.info("This edge can't be edited.")
|
||||
} else {
|
||||
console.log("DATA: ", event.target.data())
|
||||
const destinationId = event.target.data("target")
|
||||
console.log("DATA: ", event.target.data())
|
||||
const curaction = workflow.actions.find(a => a.id === destinationId)
|
||||
console.log("ACTION: ", curaction)
|
||||
if (curaction !== undefined && curaction !== null) {
|
||||
if (curaction.app_name == "Shuffle Tools" && curaction.name === "router") {
|
||||
alert.info("Router action can't have incoming conditions")
|
||||
event.target.unselect()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
setSelectedEdgeIndex(workflow.branches.findIndex(data => data.id === event.target.data()["id"]))
|
||||
setSelectedEdge(event.target.data())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user