mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
make workflow prompt inventory step optional
This commit is contained in:
parent
a8d22b9459
commit
4ea7511ae8
@ -15,11 +15,17 @@ export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel',
|
||||
scope = _scope_;
|
||||
({ modal } = scope[scope.ns]);
|
||||
|
||||
vm.isInventoryOptional = false;
|
||||
|
||||
scope.$watch('vm.promptData.triggerModalOpen', () => {
|
||||
|
||||
vm.actionButtonClicked = false;
|
||||
if(vm.promptData && vm.promptData.triggerModalOpen) {
|
||||
|
||||
if (vm.promptData.templateType === "workflow_job_template") {
|
||||
vm.isInventoryOptional = true;
|
||||
}
|
||||
|
||||
scope.$emit('launchModalOpen', true);
|
||||
vm.promptDataClone = _.cloneDeep(vm.promptData);
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<div class="Prompt-footer">
|
||||
<button id="prompt_cancel" class="Prompt-defaultButton" ng-click="vm.cancel()" ng-show="!vm.readOnlyPrompts">{{:: vm.strings.get('CANCEL') }}</button>
|
||||
<button id="prompt_close" class="Prompt-defaultButton" ng-click="vm.cancel()" ng-show="vm.readOnlyPrompts">{{:: vm.strings.get('CLOSE') }}</button>
|
||||
<button id="prompt_inventory_next" class="Prompt-actionButton" ng-show="vm.steps.inventory.tab._active" ng-click="vm.next(vm.steps.inventory.tab)" ng-disabled="!vm.promptDataClone.prompts.inventory.value.id && !vm.readOnlyPrompts">{{:: vm.strings.get('NEXT') }}</button>
|
||||
<button id="prompt_inventory_next" class="Prompt-actionButton" ng-show="vm.steps.inventory.tab._active" ng-click="vm.next(vm.steps.inventory.tab)" ng-disabled="!vm.isInventoryOptional && !vm.promptDataClone.prompts.inventory.value.id && !vm.readOnlyPrompts">{{:: vm.strings.get('NEXT') }}</button>
|
||||
<button id="prompt_credential_next" class="Prompt-actionButton"
|
||||
ng-show="vm.steps.credential.tab._active"
|
||||
ng-click="vm.next(vm.steps.credential.tab)"
|
||||
|
||||
@ -748,6 +748,7 @@ export default ['$scope', 'WorkflowService', 'TemplatesService',
|
||||
launchOptions: launchOptions,
|
||||
prompts: prompts,
|
||||
surveyQuestions: surveyQuestionRes.data.spec,
|
||||
templateType: $scope.nodeBeingEdited.unifiedJobTemplate.type,
|
||||
template: $scope.nodeBeingEdited.unifiedJobTemplate.id
|
||||
};
|
||||
|
||||
@ -770,6 +771,7 @@ export default ['$scope', 'WorkflowService', 'TemplatesService',
|
||||
launchConf: launchConf,
|
||||
launchOptions: launchOptions,
|
||||
prompts: prompts,
|
||||
templateType: $scope.nodeBeingEdited.unifiedJobTemplate.type,
|
||||
template: $scope.nodeBeingEdited.unifiedJobTemplate.id
|
||||
};
|
||||
|
||||
@ -1053,6 +1055,7 @@ export default ['$scope', 'WorkflowService', 'TemplatesService',
|
||||
launchOptions: responses[0].data,
|
||||
surveyQuestions: processed.surveyQuestions,
|
||||
template: selectedTemplate.id,
|
||||
templateType: selectedTemplate.type,
|
||||
prompts: PromptService.processPromptValues({
|
||||
launchConf: responses[1].data,
|
||||
launchOptions: responses[0].data
|
||||
@ -1077,6 +1080,7 @@ export default ['$scope', 'WorkflowService', 'TemplatesService',
|
||||
launchConf,
|
||||
launchOptions: responses[0].data,
|
||||
template: selectedTemplate.id,
|
||||
templateType: selectedTemplate.type,
|
||||
prompts: PromptService.processPromptValues({
|
||||
launchConf: responses[1].data,
|
||||
launchOptions: responses[0].data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user