diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 018d6004..e82d607a 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -639,7 +639,7 @@ const AngularWorkflow = (props) => { } if (executionText.length > 0) { - alert.success("Starting execution with argument "+executionText) + alert.success("Starting execution with an execution argument") } else { alert.success("Starting execution") } @@ -5037,6 +5037,7 @@ const AngularWorkflow = (props) => { @@ -5167,8 +5168,10 @@ const AngularWorkflow = (props) => { return (
-

Execution Argument:

- {executionData.execution_argument} +

Execution Argument

+
+ {executionData.execution_argument} +
) } @@ -5272,14 +5275,7 @@ const AngularWorkflow = (props) => { -

Executing Workflow

- Show failed / skipped actions} - control={ - {setShowSkippedActions(!showSkippedActions)}} /> - } - /> +

Executing Workflow

{executionData.status !== undefined && executionData.status.length > 0 ?
Status: {executionData.status} @@ -5292,7 +5288,7 @@ const AngularWorkflow = (props) => {
: null } - {executionData.completed_at !== undefined ? + {executionData.completed_at !== undefined && executionData.completed_at !== null && executionData.completed_at > 0 ?
Finished: {new Date(executionData.completed_at*1000).toISOString()}
@@ -5308,7 +5304,19 @@ const AngularWorkflow = (props) => { parsedExecutionArgument() : null } + {executionData.results !== undefined && executionData.results !== null && executionData.results.length > 1 && executionData.results.find(result => result.status === "SKIPPED" || result.status === "FAILURE") ? + Show failed / skipped actions} + control={ + {setShowSkippedActions(!showSkippedActions)}} /> + } + /> + : + null + }
+ Actions
{executionData.status !== undefined && executionData.status !== "ABORTED" && executionData.status !== "FINISHED" && executionData.status !== "FAILURE" ? : null} diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index 9768ada1..030586fd 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -334,6 +334,7 @@ const AppCreator = (props) => { } }) .catch(error => { + console.log("Error: ", error.toString()) alert.error(error.toString()) }); } @@ -405,11 +406,33 @@ const AppCreator = (props) => { securitySchemes = data.components.securitySchemes } + const allowedfunctions = [ + "GET", + "CONNECT", + "HEAD", + "DELETE", + "POST", + "PATCH", + "PUT", + ] + // FIXME - headers? var newActions = [] var wordlist = {} for (let [path, pathvalue] of Object.entries(data.paths)) { for (let [method, methodvalue] of Object.entries(pathvalue)) { + if (methodvalue === null) { + alert.info("Skipped method "+method) + continue + } + + if (!allowedfunctions.includes(method.toUpperCase())) { + console.log(method, path) + continue + } + + console.log("Method: ", method) + console.log("Methodval: ", methodvalue) var newaction = { "name": methodvalue.summary, "description": methodvalue.description, @@ -446,8 +469,11 @@ const AppCreator = (props) => { // https://swagger.io/docs/specification/describing-parameters/ // Need to split the data. } else if (parameter.in === "body") { - console.log("BODY: ", parameter) - newaction.body = parameter.example + // FIXME: Add tracking for components + // E.G: https://raw.githubusercontent.com/owentl/Shuffle/master/gosecure.yaml + if (parameter.example !== undefined) { + newaction.body = parameter.example + } } else if (parameter.in === "header") { newaction.headers += `${parameter.name}=${parameter.example}\n` } @@ -1732,7 +1758,7 @@ const AppCreator = (props) => { margin="normal" variant="outlined" value={baseUrl} - helperText={
Must start with http(s):// and CANT end with /.
} + helperText={Must start with http(s):// and CANT end with /. } placeholder="https://api.example.com" onChange={e => setBaseUrl(e.target.value)} onBlur={(event) => { diff --git a/frontend/src/views/Apps.jsx b/frontend/src/views/Apps.jsx index 105e5dda..0aece1c0 100644 --- a/frontend/src/views/Apps.jsx +++ b/frontend/src/views/Apps.jsx @@ -669,8 +669,9 @@ const Apps = (props) => { How it works  - Security API's  - OpenAPI directory +  - OpenAPI Validator
- Apps interact with eachother in workflows. They are created with the app creator, using OpenAPI specification or manually in python. Use the links above to find potential apps you're looking for using OpenAPI or make one from scratch. There's 1000+ available. + Apps interact with eachother in workflows. They are created with the app creator, using OpenAPI specification or manually in python. The links above are references to OpenAPI tools and other app repositories. There's ten thousands of them.