diff --git a/awx/ui/client/features/templates/templates.strings.js b/awx/ui/client/features/templates/templates.strings.js index 750a973ba1..68c97c57f7 100644 --- a/awx/ui/client/features/templates/templates.strings.js +++ b/awx/ui/client/features/templates/templates.strings.js @@ -154,7 +154,9 @@ function TemplatesStrings (BaseString) { TIMEOUT: t.s('Timeout'), APPROVED: t.s('APPROVED'), DENIED: t.s('DENIED'), - ALL_PARENTS_MUST_CONVERGE: t.s('All parents must converge before running'), + CONVERGENCE: t.s('Convergence'), + ALL: t.s('All'), + ANY: t.s('Any'), }; } diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js index 64bce33067..df75b083dd 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js +++ b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.controller.js @@ -106,6 +106,10 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService element: '#workflow_node_edge', multiple: false }); + CreateSelect2({ + element: '#workflow_node_convergence', + multiple: false + }); }; const formatPopOverDetails = (model) => { @@ -500,10 +504,22 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService type: 'workflow_job_template,job_template' }; - $scope.all_parents_must_converge = _.get( + const all_parents_must_converge = _.get( $scope, ['nodeConfig', 'node', 'all_parents_must_converge'], _.get($scope, ['nodeConfig', 'node', 'originalNodeObject', 'all_parents_must_converge'], false) ); + $scope.convergenceOptions = [ + { + label: $scope.strings.get('workflow_maker.ALL'), + value: true, + }, + { + label: $scope.strings.get('workflow_maker.ANY'), + value: false, + }, + ]; + $scope.convergenceChoice = $scope.convergenceOptions.find(({ value }) => value === all_parents_must_converge); + $scope.wf_maker_templates = []; $scope.wf_maker_template_dataset = {}; @@ -622,7 +638,7 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService $scope.confirmNodeForm = () => { const nodeFormData = { edgeType: $scope.edgeType, - all_parents_must_converge: $scope.all_parents_must_converge, + all_parents_must_converge: $scope.convergenceChoice.value, }; if ($scope.activeTab === "approval") { diff --git a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html index cdc6c966aa..a8beac4418 100644 --- a/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html +++ b/awx/ui/client/src/templates/workflows/workflow-maker/forms/workflow-node-form.partial.html @@ -183,26 +183,22 @@ -
-