Continued work on sample use cases towards onboarding

This commit is contained in:
frikky
2022-01-14 00:58:11 +01:00
parent 7ce0559448
commit 3adf98df74
3 changed files with 18 additions and 9 deletions
@@ -1348,7 +1348,7 @@ const Framework = (props) => {
})} })}
</div> </div>
} }
{ {/*
Object.getOwnPropertyNames(discoveryData).length > 0 ? Object.getOwnPropertyNames(discoveryData).length > 0 ?
<div style={{position: "absolute", top: 20, right: 50, }}> <div style={{position: "absolute", top: 20, right: 50, }}>
<Typography variant="h6" color="textPrimary" style={{marginBottom: 10, textAlign: "center",}}> <Typography variant="h6" color="textPrimary" style={{marginBottom: 10, textAlign: "center",}}>
@@ -1362,7 +1362,7 @@ const Framework = (props) => {
) )
})} })}
</div> </div>
: null} : null*/}
{ {
Object.getOwnPropertyNames(discoveryData).length > 0 ? Object.getOwnPropertyNames(discoveryData).length > 0 ?
@@ -1457,15 +1457,15 @@ const Framework = (props) => {
<Typography variant="body2" color="textSecondary" style={{marginTop: 10, marginBottom: 10, }}> <Typography variant="body2" color="textSecondary" style={{marginTop: 10, marginBottom: 10, }}>
{discoveryData.description} {discoveryData.description}
</Typography> </Typography>
{isCloud && defaultSearch !== undefined && defaultSearch.length > 0 ? {/*isCloud && defaultSearch !== undefined && defaultSearch.length > 0 ?
<WorkflowSearch {<WorkflowSearch
newSelectedApp={newSelectedApp} newSelectedApp={newSelectedApp}
setNewSelectedApp={setNewSelectedApp} setNewSelectedApp={setNewSelectedApp}
defaultSearch={defaultSearch} defaultSearch={defaultSearch}
/> />}
: :
null null
} */}
</span> </span>
: :
selectionOpen selectionOpen
+10 -1
View File
@@ -641,6 +641,12 @@ const AppCreator = (defaultprops) => {
example_response: "", example_response: "",
}; };
if (newaction.url !== undefined && newaction.url !== null && newaction.url.includes("_shuffle_replace_")) {
const regex = /_shuffle_replace_\d/i;
//console.log("NEW: ",
newaction.url = newaction.url.replace(regex, "")
}
// Finding category // Finding category
if (path.includes("/")) { if (path.includes("/")) {
const pathsplit = path.split("/"); const pathsplit = path.split("/");
@@ -665,9 +671,10 @@ const AppCreator = (defaultprops) => {
} }
if (path === "/files/{file_id}/content") { if (path === "/files/{file_id}/content") {
console.log("Method: ", path, method, methodvalue) console.log("FILE DOWNLOAD Method: ", path, method, methodvalue)
} }
// Typescript? I think not ;) // Typescript? I think not ;)
if (methodvalue["requestBody"] !== undefined) { if (methodvalue["requestBody"] !== undefined) {
//console.log("Handle requestbody: ", methodvalue["requestBody"], method, path) //console.log("Handle requestbody: ", methodvalue["requestBody"], method, path)
@@ -1354,6 +1361,8 @@ const AppCreator = (defaultprops) => {
} }
} }
newActions.push(newaction); newActions.push(newaction);
} }
} }
+2 -2
View File
@@ -1294,7 +1294,7 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
return return
} }
log.Printf("[DEBUG][%s] Failed deploy. Downloading image %s", workflowExecution.ExecutionId, image) log.Printf("[DEBUG][%s] Failed deploy. Downloading image %s: %s", workflowExecution.ExecutionId, image, err)
err := downloadDockerImageBackend(topClient, image) err := downloadDockerImageBackend(topClient, image)
executed := false executed := false
if err == nil { if err == nil {
@@ -1322,7 +1322,7 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
return return
} }
log.Printf("[WARNING] Failed deploying image THREE TIMES. Attempting to download %s as last resort from backend and dockerhub.", image) log.Printf("[WARNING] Failed deploying image THREE TIMES. Attempting to download %s as last resort from backend and dockerhub: %s", image, err)
reader, err := dockercli.ImagePull(context.Background(), image, pullOptions) reader, err := dockercli.ImagePull(context.Background(), image, pullOptions)
if err != nil && !strings.Contains(err.Error(), "Conflict. The container name") { if err != nil && !strings.Contains(err.Error(), "Conflict. The container name") {