Added basic dropdowns for variables in workflows to make exploration easier
This commit is contained in:
@@ -303,10 +303,18 @@ class AppBase:
|
|||||||
if len(action_result["action"]["parameters"]) == 0:
|
if len(action_result["action"]["parameters"]) == 0:
|
||||||
action_result["action"]["parameters"] = []
|
action_result["action"]["parameters"] = []
|
||||||
|
|
||||||
action_result["action"]["parameters"].append({
|
param_found = False
|
||||||
"name": "shuffle_action_logs",
|
for param in action_result["action"]["parameters"]:
|
||||||
"value": log_contents,
|
if param["name"] == "shuffle_action_logs":
|
||||||
})
|
param_found = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if not param_found:
|
||||||
|
action_result["action"]["parameters"].append({
|
||||||
|
"name": "shuffle_action_logs",
|
||||||
|
"value": log_contents,
|
||||||
|
})
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Failed adding parameter: {e}")
|
print(f"Failed adding parameter: {e}")
|
||||||
|
|
||||||
|
|||||||
@@ -12141,6 +12141,45 @@ const parsedExecutionArgument = () => {
|
|||||||
validate.result = JSON.parse(validate.result);
|
validate.result = JSON.parse(validate.result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const AppResultVariable = ({data}) => {
|
||||||
|
const [open, setOpen] = React.useState(false)
|
||||||
|
const showVariable = data.value.length < 60
|
||||||
|
console.log("Value: ", data.value)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{maxWidth: 600, overflowX: "hidden", }}>
|
||||||
|
<IconButton
|
||||||
|
style={{
|
||||||
|
marginBottom: 0, marginTop: 5, cursor: "pointer",
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
if (!showVariable) {
|
||||||
|
setOpen(!open)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="body1"
|
||||||
|
style={{}}
|
||||||
|
>
|
||||||
|
<b>{data.name}</b>: {showVariable ? data.value : null}
|
||||||
|
</Typography>
|
||||||
|
</IconButton>
|
||||||
|
{open ?
|
||||||
|
<Typography
|
||||||
|
variant="body2"
|
||||||
|
style={{
|
||||||
|
whiteSpace: 'pre-line',
|
||||||
|
}}
|
||||||
|
color="textSecondary"
|
||||||
|
>
|
||||||
|
{data.value}
|
||||||
|
</Typography>
|
||||||
|
: null}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
var draggingDisabled = false;
|
var draggingDisabled = false;
|
||||||
const codePopoutModal = !codeModalOpen ? null : (
|
const codePopoutModal = !codeModalOpen ? null : (
|
||||||
<Dialog
|
<Dialog
|
||||||
@@ -12374,7 +12413,7 @@ const parsedExecutionArgument = () => {
|
|||||||
variant="h6"
|
variant="h6"
|
||||||
style={{ marginBottom: 0, marginTop: 0 }}
|
style={{ marginBottom: 0, marginTop: 0 }}
|
||||||
>
|
>
|
||||||
Variables
|
Variables <span style={{fontSize: 10}}>(click to expand)</span>
|
||||||
</Typography>
|
</Typography>
|
||||||
{selectedResult.action.parameters.map((data, index) => {
|
{selectedResult.action.parameters.map((data, index) => {
|
||||||
if (data.value.length === 0) {
|
if (data.value.length === 0) {
|
||||||
@@ -12390,14 +12429,7 @@ const parsedExecutionArgument = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={index} style={{}}>
|
<AppResultVariable key={index} data={data}/>
|
||||||
<Typography
|
|
||||||
variant="body1"
|
|
||||||
style={{ marginBottom: 0, marginTop: 5 }}
|
|
||||||
>
|
|
||||||
<b>{data.name}</b>: {data.value}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user