From 190d13080c0f6d8844e27208d2a18a32676a8080 Mon Sep 17 00:00:00 2001 From: frikky Date: Sat, 23 May 2020 06:55:26 +0200 Subject: [PATCH] Added action and parameter info to App selection --- frontend/src/AngularWorkflow.js | 93 +++++++++++++++++++++++---------- frontend/src/Apps.js | 74 +++++++++++++++++++++++++- 2 files changed, 136 insertions(+), 31 deletions(-) diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js index 869182cb..5ad736b9 100644 --- a/frontend/src/AngularWorkflow.js +++ b/frontend/src/AngularWorkflow.js @@ -2338,10 +2338,15 @@ const AngularWorkflow = (props) => {
{ @@ -2551,6 +2561,11 @@ const AngularWorkflow = (props) => { backgroundColor: inputColor, } }} + SelectDisplayProps={{ + style: { + marginLeft: 10, + } + }} fullWidth onChange={(e) => { const env = environments.find(a => a.Name === e.target.value) @@ -2586,6 +2601,11 @@ const AngularWorkflow = (props) => { fullWidth onChange={setNewSelectedAction} style={{backgroundColor: inputColor, color: "white", height: "50px"}} + SelectDisplayProps={{ + style: { + marginLeft: 10, + } + }} > {selectedApp.actions.map(data => { var newActionname = data.name @@ -2820,18 +2840,23 @@ const AngularWorkflow = (props) => { datafield =
{ { + setSelectedAction(event.target.value) + }} + style={{backgroundColor: inputColor, color: "white", height: "50px"}} + SelectDisplayProps={{ + style: { + marginLeft: 10, + } + }} + > + {selectedApp.actions.map(data => { + var newActionname = data.label !== undefined && data.label.length > 0 ? data.label : data.name + + // ROFL FIXME - loop + newActionname = newActionname.replace("_", " ") + newActionname = newActionname.replace("_", " ") + newActionname = newActionname.replace("_", " ") + newActionname = newActionname.replace("_", " ") + newActionname = newActionname.charAt(0).toUpperCase()+newActionname.substring(1) + return ( + + {newActionname} + + + ) + })} + +
+ + {selectedAction.parameters !== undefined ? +
+ Arguments + {selectedAction.parameters.map(data => { + var itemColor = "#f85a3e" + if (!data.required) { + itemColor = "#ffeb3b" + } + + const circleSize = 10 + return ( + +
+ {data.name} + + + ) + })} +
+ : null} + {editButton} {deleteButton}
@@ -384,6 +452,7 @@ const Apps = (props) => {

Available integrations

{isLoading ? : null} + {/* + */}