mirror of
https://github.com/ansible/awx.git
synced 2026-01-24 16:01:20 -03:30
Add any/all option for workflow node convergence
This commit is contained in:
parent
70cf4cf5d4
commit
987fc26537
@ -153,7 +153,8 @@ function TemplatesStrings (BaseString) {
|
||||
TIMED_OUT: t.s('APPROVAL TIMED OUT'),
|
||||
TIMEOUT: t.s('Timeout'),
|
||||
APPROVED: t.s('APPROVED'),
|
||||
DENIED: t.s('DENIED')
|
||||
DENIED: t.s('DENIED'),
|
||||
ALL_PARENTS_MUST_CONVERGE: t.s('All parents must converge before running'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -500,6 +500,10 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService
|
||||
type: 'workflow_job_template,job_template'
|
||||
};
|
||||
|
||||
$scope.all_parents_must_converge = _.get(
|
||||
$scope, ['nodeConfig', 'node', 'all_parents_must_converge'],
|
||||
_.get($scope, ['nodeConfig', 'node', 'originalNodeObject', 'all_parents_must_converge'], false)
|
||||
);
|
||||
$scope.wf_maker_templates = [];
|
||||
$scope.wf_maker_template_dataset = {};
|
||||
|
||||
@ -617,7 +621,8 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService
|
||||
|
||||
$scope.confirmNodeForm = () => {
|
||||
const nodeFormData = {
|
||||
edgeType: $scope.edgeType
|
||||
edgeType: $scope.edgeType,
|
||||
all_parents_must_converge: $scope.all_parents_must_converge,
|
||||
};
|
||||
|
||||
if ($scope.activeTab === "approval") {
|
||||
|
||||
@ -183,6 +183,28 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="workflow_node_checkbox_group" class="form-group Form-formGroup Form-formGroup--singleColumn" >
|
||||
<label class="Form-inputLabelContainer" for="checkbox_group">
|
||||
<span translate class="Form-inputLabel">Options</span>
|
||||
</label>
|
||||
<div>
|
||||
<div id="workflow_node_checkbox_group_chbox_group" class="checkbox-group">
|
||||
<div class="form-check">
|
||||
<label for="all_parents_must_converge" class="form-check-label">
|
||||
<input
|
||||
ng-disabled="readOnly"
|
||||
id="workflow_node_all_parents_must_converge_checkbox"
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
name="all_parents_must_converge"
|
||||
ng-model="all_parents_must_converge"
|
||||
/>
|
||||
<span class="Form-inputLabel">{{:: strings.get('workflow_maker.ALL_PARENTS_MUST_CONVERGE') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="readOnly">
|
||||
<div
|
||||
class="WorkflowMaker-readOnlyPromptText"
|
||||
|
||||
@ -92,7 +92,8 @@ export default ['$scope', 'TemplatesService',
|
||||
limit: null,
|
||||
diff_mode: null,
|
||||
verbosity: null,
|
||||
credential: null
|
||||
credential: null,
|
||||
all_parents_must_converge: _.get(node, 'all_parents_must_converge', false)
|
||||
};
|
||||
|
||||
if (_.has(node, 'fullUnifiedJobTemplateObject')) {
|
||||
@ -637,6 +638,7 @@ export default ['$scope', 'TemplatesService',
|
||||
});
|
||||
}
|
||||
}
|
||||
nodeRef[$scope.nodeConfig.nodeId].all_parents_must_converge = nodeFormData.all_parents_must_converge;
|
||||
|
||||
$scope.graphState.arrayOfNodesForChart.map( (node) => {
|
||||
if (node.id === nodeId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user