#266: Fixed key:value store for options with ||
This commit is contained in:
@@ -1423,6 +1423,20 @@ class AppBase:
|
|||||||
for parameter in action["parameters"]:
|
for parameter in action["parameters"]:
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
||||||
|
# Hack for key:value in options using ||
|
||||||
|
try:
|
||||||
|
if parameter["options"] != None and len(parameter["options"]) > 0:
|
||||||
|
#print(f'OPTIONS: {parameter["options"]}')
|
||||||
|
#print(f'OPTIONS VAL: {parameter}')
|
||||||
|
if "||" in parameter["value"]:
|
||||||
|
splitvalue = parameter["value"].split("||")
|
||||||
|
if len(splitvalue) > 1:
|
||||||
|
print(f'[INFO] Parsed split || options of actions["parameters"]["name"]')
|
||||||
|
action["parameters"][counter]["value"] = splitvalue[1]
|
||||||
|
|
||||||
|
except (IndexError, KeyError, TypeError) as e:
|
||||||
|
print("Options err: {e}")
|
||||||
|
|
||||||
if parameter["name"] == "body":
|
if parameter["name"] == "body":
|
||||||
bodyindex = counter
|
bodyindex = counter
|
||||||
#print("PARAM: %s" % parameter)
|
#print("PARAM: %s" % parameter)
|
||||||
|
|||||||
@@ -3355,11 +3355,19 @@ const AngularWorkflow = (props) => {
|
|||||||
}}
|
}}
|
||||||
style={{backgroundColor: surfaceColor, color: "white", height: "50px"}}
|
style={{backgroundColor: surfaceColor, color: "white", height: "50px"}}
|
||||||
>
|
>
|
||||||
{selectedActionParameters[count].options.map(data => (
|
{selectedActionParameters[count].options.map((data, index) => {
|
||||||
<MenuItem key={data} style={{backgroundColor: inputColor, color: "white"}} value={data}>
|
const split_data = data.split("||")
|
||||||
{data}
|
var viewed_data = data
|
||||||
</MenuItem>
|
if (split_data.length > 1) {
|
||||||
))}
|
viewed_data = split_data[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MenuItem key={data} style={{backgroundColor: inputColor, color: "white"}} value={data}>
|
||||||
|
{viewed_data}
|
||||||
|
</MenuItem>
|
||||||
|
)
|
||||||
|
})}
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
} else if (data.variant === "STATIC_VALUE") {
|
} else if (data.variant === "STATIC_VALUE") {
|
||||||
@@ -6628,15 +6636,15 @@ const AngularWorkflow = (props) => {
|
|||||||
<div style={{display: "flex"}}>
|
<div style={{display: "flex"}}>
|
||||||
<h2>Executing Workflow</h2>
|
<h2>Executing Workflow</h2>
|
||||||
<Tooltip color="primary" title="Rerun workflow" placement="top">
|
<Tooltip color="primary" title="Rerun workflow" placement="top">
|
||||||
<span>
|
<span style={{}}>
|
||||||
<Button color="primary" style={{float: "right"}} onClick={() => {
|
<Button color="primary" style={{float: "right", marginTop: 20, marginLeft: 10,}} onClick={() => {
|
||||||
console.log("DATA: ", executionData)
|
console.log("DATA: ", executionData)
|
||||||
executeWorkflow(executionData.execution_argument, executionData.start)
|
executeWorkflow(executionData.execution_argument, executionData.start)
|
||||||
setExecutionModalOpen(false)
|
setExecutionModalOpen(false)
|
||||||
//executionText, workflow.start)
|
//executionText, workflow.start)
|
||||||
}}>
|
}}>
|
||||||
<CachedIcon style={{}}/>
|
<CachedIcon style={{}}/>
|
||||||
</Button>
|
</Button>
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user