Fixed bugs related to app execution
This commit is contained in:
@@ -1212,7 +1212,10 @@ class AppBase:
|
||||
if len(value) == 0:
|
||||
return basejson, False
|
||||
|
||||
if isinstance(basejson[value], str):
|
||||
if isinstance(basejson, list):
|
||||
print("VALUE IN ISINSTANCE IS NOT TO BE USED (list): %s" % value)
|
||||
return basejson, False
|
||||
elif isinstance(basejson[value], str):
|
||||
print(f"LOADING STRING '%s' AS JSON" % basejson[value])
|
||||
try:
|
||||
basejson = json.loads(basejson[value])
|
||||
@@ -1754,7 +1757,7 @@ class AppBase:
|
||||
action["parameters"][counter]["value"] = json.dumps(newvalue)
|
||||
|
||||
except json.decoder.JSONDecodeError as e:
|
||||
print("Failed JSON replacement for OpenAPI keys (2) %s", val["key"])
|
||||
print("Failed JSON replacement for OpenAPI keys (2) {e}")
|
||||
|
||||
#if "\n" in action["parameters"][counter]["value"]:
|
||||
# print("MODIFYING BODY!!")
|
||||
@@ -1852,7 +1855,6 @@ class AppBase:
|
||||
|
||||
print("PRE new_replacement")
|
||||
|
||||
# FIXME: Only do this IF they want to loop
|
||||
new_replacement = []
|
||||
for i in range(len(json_replacement)):
|
||||
if isinstance(json_replacement[i], dict) or isinstance(json_replacement[i], list):
|
||||
|
||||
+2
-23
@@ -2457,12 +2457,6 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
||||
log.Printf("This should trigger in the cloud. Duplicate action allowed onprem.")
|
||||
}
|
||||
|
||||
type ExecutionStruct struct {
|
||||
Start string `json:"start"`
|
||||
ExecutionSource string `json:"execution_source"`
|
||||
ExecutionArgument string `json:"execution_argument"`
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(request.Body)
|
||||
if err != nil {
|
||||
log.Printf("Body data error: %s", err)
|
||||
@@ -2476,26 +2470,11 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
||||
// This is a specific fix for MSteams and may fix other things as well
|
||||
// Scared whether it may stop other things though, but that's a future problem
|
||||
// (famous last words)
|
||||
parsedBody := string(body)
|
||||
if strings.Contains(parsedBody, "choice") {
|
||||
if strings.Count(parsedBody, `\\n`) > 2 {
|
||||
parsedBody = strings.Replace(parsedBody, `\\n`, "", -1)
|
||||
}
|
||||
if strings.Count(parsedBody, `\u0022`) > 2 {
|
||||
parsedBody = strings.Replace(parsedBody, `\u0022`, `"`, -1)
|
||||
}
|
||||
if strings.Count(parsedBody, `\\"`) > 2 {
|
||||
parsedBody = strings.Replace(parsedBody, `\\"`, `"`, -1)
|
||||
}
|
||||
|
||||
if strings.Contains(parsedBody, `"extra": "{`) {
|
||||
parsedBody = strings.Replace(parsedBody, `"extra": "{`, `"extra": {`, 1)
|
||||
parsedBody = strings.Replace(parsedBody, `}"}`, `}}`, 1)
|
||||
}
|
||||
}
|
||||
parsedBody = shuffle.GetExecutiobody(body)
|
||||
|
||||
//log.Printf("\n\nPARSEDBODY: %s", parsedBody)
|
||||
newBody := ExecutionStruct{
|
||||
newBody := shuffle.ExecutionStruct{
|
||||
Start: hook.Start,
|
||||
ExecutionSource: "webhook",
|
||||
ExecutionArgument: parsedBody,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
frontend:
|
||||
build: ./frontend
|
||||
#build: ./frontend
|
||||
image: ghcr.io/frikky/shuffle-frontend:0.8.74
|
||||
container_name: shuffle-frontend
|
||||
hostname: shuffle-frontend
|
||||
|
||||
@@ -1348,7 +1348,7 @@ const AngularWorkflow = (props) => {
|
||||
return
|
||||
}
|
||||
|
||||
if (originalLocation.x === 0 && originalLocation.y === 0) {
|
||||
if (originalLocation.x === 0 && originalLocation.y === 0 && nodedata.position !== undefined) {
|
||||
console.log("Updating location!: ", nodedata)
|
||||
originalLocation.x = nodedata.position.x
|
||||
originalLocation.y = nodedata.position.y
|
||||
|
||||
Reference in New Issue
Block a user