diff --git a/README.md b/README.md index 9dbdbfbf..a3db9e5a 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,8 @@ There will be a major overhaul to the backend specifically. I'm currently moving - * Full OpenAPI support with authentication schemes in App creator (not Oauth2 yet) - * Change workflow name - * User run statistics +- Extended result data usage, build json with answers, not just "from previous action" - Workflows - IMPORT DEFAULT WORKFLOWS - Create some towards e.g. TheHive & MISP. -- Extended data usage - build json with answers - Documentation - General documentation /docs rewrite - API doc - 1. In Shuffle. 2. In e.g. python - Fix scheduler diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js index 016cbcab..66d1b81f 100644 --- a/frontend/src/AngularWorkflow.js +++ b/frontend/src/AngularWorkflow.js @@ -1028,8 +1028,6 @@ const AngularWorkflow = (props) => { }, { duration: animationDuration, }) - - console.log(previousnodecolor) } const onNodeHover = (event) => { @@ -2134,11 +2132,15 @@ const AngularWorkflow = (props) => { var staticcolor = "inherit" var actioncolor = "inherit" var varcolor = "inherit" - var multiline = false + var multiline if (data.multiline !== undefined && data.multiline !== null && data.multiline === true) { multiline = true } + if (data.value.startsWith("{") && data.value.endsWith("}")) { + multiline = true + } + var placeholder = "Static value" if (data.example !== undefined && data.example !== null && data.example.length > 0) { placeholder = data.example @@ -2165,12 +2167,24 @@ const AngularWorkflow = (props) => { onChange={(event) => { changeActionParameter(event, count) }} + onBlur={(event) => { + // Super basic check + if (event.target.value.startsWith("{")) { + console.log("VALIDATING JSON") + try { + JSON.parse(event.target.value) + } catch (e) { + alert.error("Failed to parse json") + } + } + }} /> // Remap data based on variant if (data.variant === "STATIC_VALUE") { staticcolor = "#f85a3e" + console.log("DATA IS STATIC") } else if (data.variant === "ACTION_RESULT") { // Gets the parents of the current node var parents = getParents(selectedAction) @@ -2390,7 +2404,7 @@ const AngularWorkflow = (props) => {
Environment: