Fixed the action parameter bug
This commit is contained in:
@@ -381,13 +381,12 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (selectedActionParameters !== undefined && selectedActionParameters !== null && selectedActionParameters.length === 0
|
if (selectedActionParameters !== undefined && selectedActionParameters !== null
|
||||||
) {
|
) {
|
||||||
if (selectedAction.parameters !== undefined && selectedAction.parameters !== null && selectedAction.parameters.length > 0) {
|
if (selectedAction.parameters !== undefined && selectedAction.parameters !== null && selectedAction.parameters.length > 0) {
|
||||||
setSelectedActionParameters(selectedAction.parameters);
|
setSelectedActionParameters(selectedAction.parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((selectedVariableParameter === null || selectedVariableParameter === undefined) && workflow.workflow_variables !== null && workflow.workflow_variables.length > 0) {
|
if ((selectedVariableParameter === null || selectedVariableParameter === undefined) && workflow.workflow_variables !== null && workflow.workflow_variables.length > 0) {
|
||||||
|
|
||||||
// FIXME - this is the bad thing
|
// FIXME - this is the bad thing
|
||||||
@@ -613,7 +612,8 @@ const ParsedAction = (props) => {
|
|||||||
setActionlist(actionlist);
|
setActionlist(actionlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
[selectedAction, selectedVariableParameter, workflowExecutions, listCache]);
|
||||||
|
|
||||||
|
|
||||||
const calculateHelpertext = (input_data) => {
|
const calculateHelpertext = (input_data) => {
|
||||||
@@ -1307,6 +1307,8 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
|
|
||||||
const selectedAppIcon = selectedAction.large_image
|
const selectedAppIcon = selectedAction.large_image
|
||||||
|
console.log("Selected action: ", selectedAction)
|
||||||
|
console.log("Selected action paramaters: ", selectedAction.parameters)
|
||||||
var baselabel = selectedAction.label
|
var baselabel = selectedAction.label
|
||||||
return (
|
return (
|
||||||
<div style={appApiViewStyle} id="parsed_action_view">
|
<div style={appApiViewStyle} id="parsed_action_view">
|
||||||
@@ -2075,7 +2077,6 @@ const ParsedAction = (props) => {
|
|||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{workflow.execution_variables !== undefined &&
|
{workflow.execution_variables !== undefined &&
|
||||||
workflow.execution_variables !== null &&
|
workflow.execution_variables !== null &&
|
||||||
workflow.execution_variables.length > 0 ? (
|
workflow.execution_variables.length > 0 ? (
|
||||||
@@ -2395,7 +2396,6 @@ const ParsedAction = (props) => {
|
|||||||
})}
|
})}
|
||||||
</Select>
|
</Select>
|
||||||
: null*/}
|
: null*/}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
marginTop: "10px",
|
marginTop: "10px",
|
||||||
@@ -2776,7 +2776,7 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
placeholder = data.example;
|
placeholder = data.example;
|
||||||
|
|
||||||
if (data.name === "url" && data.value !== undefined && data.value !== null && data.value.length === 0) {
|
if (data.name === "url" && data.value !== undefined && data.value !== null && data.value.length > 0) {
|
||||||
data.value = data.example;
|
data.value = data.example;
|
||||||
}
|
}
|
||||||
// In case of data.example
|
// In case of data.example
|
||||||
|
|||||||
@@ -4584,6 +4584,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
workflow.actions[foundindex].name = curaction.name
|
workflow.actions[foundindex].name = curaction.name
|
||||||
|
|
||||||
setWorkflow(workflow)
|
setWorkflow(workflow)
|
||||||
|
console.log(workflow)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user