diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod
index c630b9ff..9accdf46 100644
--- a/backend/go-app/go.mod
+++ b/backend/go-app/go.mod
@@ -6,7 +6,7 @@ toolchain go1.23.8
//replace github.com/frikky/schemaless => ../../../schemaless
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
-//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
+replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
require (
cloud.google.com/go/datastore v1.20.0
@@ -22,7 +22,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/h2non/filetype v1.1.3
github.com/satori/go.uuid v1.2.0
- github.com/shuffle/shuffle-shared v0.8.58
+ github.com/shuffle/shuffle-shared v0.8.60
golang.org/x/crypto v0.37.0
google.golang.org/api v0.228.0
google.golang.org/grpc v1.71.1
diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go
index 8357de3e..4329e4af 100755
--- a/backend/go-app/walkoff.go
+++ b/backend/go-app/walkoff.go
@@ -1905,8 +1905,8 @@ func scheduleWorkflow(resp http.ResponseWriter, request *http.Request) {
err = shuffle.SetSchedule(ctx, newSchedule)
if err != nil {
- log.Printf("Failed setting cloud schedule: %s", err)
- resp.WriteHeader(401)
+ log.Printf("[ERROR] Failed setting cloud schedule: %s", err)
+ resp.WriteHeader(400)
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "%s"}`, err)))
return
}
@@ -1941,17 +1941,22 @@ func scheduleWorkflow(resp http.ResponseWriter, request *http.Request) {
// FIXME - real error message lol
if err != nil {
- log.Printf("Failed creating schedule: %s", err)
- resp.WriteHeader(401)
- resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Invalid argument. Try cron */15 * * * *"}`)))
+ log.Printf("[ERROR] Failed creating schedule: %s", err)
+
+ resp.WriteHeader(400)
+ if schedule.Environment == "cloud" {
+ resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Invalid argument. For cloud schedules, try cron */15 * * * *"}`)))
+ } else {
+ resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Invalid argument. For onprem schedules, try 60 for 60 seconds"}`)))
+ }
return
}
//workflow.Schedules = append(workflow.Schedules, schedule)
err = shuffle.SetWorkflow(ctx, *workflow, workflow.ID)
if err != nil {
- log.Printf("Failed setting workflow for schedule: %s", err)
- resp.WriteHeader(401)
+ log.Printf("[ERROR] Failed setting workflow for schedule: %s", err)
+ resp.WriteHeader(400)
resp.Write([]byte(`{"success": false}`))
return
}
diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx
index 37e2e056..db5111bd 100755
--- a/frontend/src/views/AngularWorkflow.jsx
+++ b/frontend/src/views/AngularWorkflow.jsx
@@ -790,7 +790,7 @@ const AngularWorkflow = (defaultprops) => {
},
{
"name": "fields",
- "value": "",
+ "value": '{\n "ticket_id": "123456",\n "comment": "This is a comment"\n}',
"required": false,
"multiline": true,
},
@@ -7000,7 +7000,11 @@ const AngularWorkflow = (defaultprops) => {
})
.then((responseJson) => {
if (responseJson.success === false) {
- toast("Failed to auto-activate the app. Go to /apps and activate it.")
+ if (responseJson.reason !== undefined && responseJson.reason !== null && responseJson.reason.length > 0) {
+ toast.error("Failed to auto-activate the app: " + responseJson.reason)
+ } else {
+ toast.error("Failed to auto-activate the app. Go to /apps and activate it.")
+ }
} else {
if (refresh === true) {
setHighlightedApp(appid)
@@ -10312,7 +10316,7 @@ const AngularWorkflow = (defaultprops) => {
}
}
- toast("Creating schedule")
+ toast.info("Creating schedule")
var data = {
name: trigger.name,
frequency: workflow.triggers[triggerindex].parameters[0].value,
@@ -10361,9 +10365,9 @@ const AngularWorkflow = (defaultprops) => {
})
.then((responseJson) => {
if (!responseJson.success) {
- toast("Failed to set schedule: " + responseJson.reason);
+ toast.error("Failed to set schedule: " + responseJson.reason);
} else {
- toast("Successfully created schedule");
+ toast.success("Successfully created schedule");
workflow.triggers[triggerindex].status = "running";
trigger.status = "running";
setSelectedTrigger(trigger);
@@ -11876,8 +11880,9 @@ const AngularWorkflow = (defaultprops) => {
var type = "app"
const baseImage =