Added schedule overview to admin

This commit is contained in:
frikky
2020-06-11 18:03:01 +02:00
parent 8b606620d0
commit c592ca649a
4 changed files with 173 additions and 18 deletions
+1 -13
View File
@@ -2021,6 +2021,7 @@ func executeWorkflow(resp http.ResponseWriter, request *http.Request) {
}
func stopSchedule(resp http.ResponseWriter, request *http.Request) {
log.Printf("Delete?")
cors := handleCors(resp, request)
if cors {
return
@@ -2079,19 +2080,6 @@ func stopSchedule(resp http.ResponseWriter, request *http.Request) {
return
}
if len(workflow.Actions) == 0 {
workflow.Actions = []Action{}
}
if len(workflow.Branches) == 0 {
workflow.Branches = []Branch{}
}
if len(workflow.Triggers) == 0 {
workflow.Triggers = []Trigger{}
}
if len(workflow.Errors) == 0 {
workflow.Errors = []string{}
}
err = deleteSchedule(ctx, scheduleId)
if err != nil {
if strings.Contains(err.Error(), "Job not found") {