Minor fixes for testing Singul locally
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 = <LibraryBooksIcon />
|
||||
const width = 230
|
||||
return (
|
||||
<div style={{ position: "relative", marginTop: 15, marginLeft: 0, marginRight: 10, position: "absolute", color: theme.palette.textColor, zIndex: 1001, backgroundColor: theme.palette.textFieldStyle.backgroundColor, minWidth: leftBarSize+30, maxWidth: 340, boxShadows: "none", overflowX: "hidden", }}>
|
||||
<div style={{ position: "relative", marginTop: 15, marginLeft: 0, marginRight: 10, position: "absolute", color: theme.palette.textColor, zIndex: 1001, backgroundColor: theme.palette.textFieldStyle.backgroundColor, /*minWidth: leftBarSize+30,*/ minWidth: width, maxWidth: width, boxShadows: "none", overflowX: "hidden", }}>
|
||||
<List style={{ backgroundColor: theme.palette.inputColor, }}>
|
||||
{hits.length === 0 ?
|
||||
<ListItem style={outerlistitemStyle}>
|
||||
@@ -11971,7 +11976,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
}}
|
||||
defaultPosition={{ x: 0, y: 0 }}
|
||||
>
|
||||
<div style={{ textDecoration: "none", color: theme.palette.text.primary, }} onClick={(event) => {
|
||||
<div style={{ overflow: "hidden", textDecoration: "none", color: theme.palette.text.primary, }} onClick={(event) => {
|
||||
clickedApp(hit)
|
||||
|
||||
}}>
|
||||
@@ -12125,7 +12130,12 @@ const AngularWorkflow = (defaultprops) => {
|
||||
}
|
||||
|
||||
if ((app.id === "integration" || app.id === "shuffle_agent") && userdata.support !== true) {
|
||||
return null
|
||||
console.log("APPID: ", app.id, isCloud)
|
||||
if (isCloud === false && app.id === "integration") {
|
||||
} else {
|
||||
console.log("RETURNING", app.id)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
if (viewedApps.includes(app.id)) {
|
||||
@@ -12190,7 +12200,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
</div>
|
||||
) : apps.length > 0 ? (
|
||||
<div
|
||||
style={{ textAlign: "center", width: leftBarSize, marginTop: 10, marginLeft: 5, marginRight: 5, }}
|
||||
style={{ textAlign: "center", width: leftBarSize, marginTop: 25, marginLeft: 10 , marginRight: 10, }}
|
||||
onLoad={() => {
|
||||
console.log("Should load in extra apps?")
|
||||
}}
|
||||
@@ -12198,6 +12208,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<Typography variant="body1" color="textSecondary">
|
||||
Couldn't find the apps you were looking for? Searching unactivated apps. Click one of these apps to Activate it for your organisation.
|
||||
</Typography>
|
||||
|
||||
<InstantSearch searchClient={searchClient} indexName="appsearch" onClick={() => {
|
||||
console.log("CLICKED")
|
||||
}}>
|
||||
|
||||
Reference in New Issue
Block a user