mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Add any/all option for workflow node convergence
This commit is contained in:
@@ -153,7 +153,8 @@ function TemplatesStrings (BaseString) {
|
|||||||
TIMED_OUT: t.s('APPROVAL TIMED OUT'),
|
TIMED_OUT: t.s('APPROVAL TIMED OUT'),
|
||||||
TIMEOUT: t.s('Timeout'),
|
TIMEOUT: t.s('Timeout'),
|
||||||
APPROVED: t.s('APPROVED'),
|
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'
|
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_templates = [];
|
||||||
$scope.wf_maker_template_dataset = {};
|
$scope.wf_maker_template_dataset = {};
|
||||||
|
|
||||||
@@ -617,7 +621,8 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService
|
|||||||
|
|
||||||
$scope.confirmNodeForm = () => {
|
$scope.confirmNodeForm = () => {
|
||||||
const nodeFormData = {
|
const nodeFormData = {
|
||||||
edgeType: $scope.edgeType
|
edgeType: $scope.edgeType,
|
||||||
|
all_parents_must_converge: $scope.all_parents_must_converge,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($scope.activeTab === "approval") {
|
if ($scope.activeTab === "approval") {
|
||||||
|
|||||||
@@ -183,6 +183,28 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</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 ng-show="readOnly">
|
||||||
<div
|
<div
|
||||||
class="WorkflowMaker-readOnlyPromptText"
|
class="WorkflowMaker-readOnlyPromptText"
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ export default ['$scope', 'TemplatesService',
|
|||||||
limit: null,
|
limit: null,
|
||||||
diff_mode: null,
|
diff_mode: null,
|
||||||
verbosity: null,
|
verbosity: null,
|
||||||
credential: null
|
credential: null,
|
||||||
|
all_parents_must_converge: _.get(node, 'all_parents_must_converge', false)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_.has(node, 'fullUnifiedJobTemplateObject')) {
|
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) => {
|
$scope.graphState.arrayOfNodesForChart.map( (node) => {
|
||||||
if (node.id === nodeId) {
|
if (node.id === nodeId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user