From d65687f14a4f7be9fd7302a224121f9364b543ac Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Sun, 11 Nov 2018 02:37:17 -0500 Subject: [PATCH] add workflow inventory prompt to scheduler --- .../src/scheduler/schedulerAdd.controller.js | 16 +++++++++++++++- .../src/scheduler/schedulerEdit.controller.js | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/scheduler/schedulerAdd.controller.js b/awx/ui/client/src/scheduler/schedulerAdd.controller.js index e3fdda845f..a9e0b9eff7 100644 --- a/awx/ui/client/src/scheduler/schedulerAdd.controller.js +++ b/awx/ui/client/src/scheduler/schedulerAdd.controller.js @@ -239,7 +239,19 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait', }); }; - if(!launchConf.survey_enabled) { + if (!launchConf.survey_enabled && + !launchConf.ask_inventory_on_launch && + !launchConf.ask_credential_on_launch && + !launchConf.ask_verbosity_on_launch && + !launchConf.ask_job_type_on_launch && + !launchConf.ask_limit_on_launch && + !launchConf.ask_tags_on_launch && + !launchConf.ask_skip_tags_on_launch && + !launchConf.ask_diff_mode_on_launch && + !launchConf.survey_enabled && + !launchConf.credential_needed_to_start && + !launchConf.inventory_needed_to_start && + launchConf.variables_needed_to_start.length === 0) { $scope.showPromptButton = false; } else { $scope.showPromptButton = true; @@ -259,6 +271,7 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait', launchConf: responses[1].data, launchOptions: responses[0].data, surveyQuestions: processed.surveyQuestions, + templateType: ParentObject.type, template: ParentObject.id, prompts: PromptService.processPromptValues({ launchConf: responses[1].data, @@ -283,6 +296,7 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait', $scope.promptData = { launchConf: responses[1].data, launchOptions: responses[0].data, + templateType: ParentObject.type, template: ParentObject.id, prompts: PromptService.processPromptValues({ launchConf: responses[1].data, diff --git a/awx/ui/client/src/scheduler/schedulerEdit.controller.js b/awx/ui/client/src/scheduler/schedulerEdit.controller.js index 0e27408c1f..75ed397e7b 100644 --- a/awx/ui/client/src/scheduler/schedulerEdit.controller.js +++ b/awx/ui/client/src/scheduler/schedulerEdit.controller.js @@ -424,7 +424,20 @@ function($filter, $state, $stateParams, Wait, $scope, moment, currentValues: scheduleResolve }); - if(!launchConf.survey_enabled) { + if (!launchConf.survey_enabled && + !launchConf.ask_inventory_on_launch && + !launchConf.ask_credential_on_launch && + !launchConf.ask_verbosity_on_launch && + !launchConf.ask_job_type_on_launch && + !launchConf.ask_limit_on_launch && + !launchConf.ask_tags_on_launch && + !launchConf.ask_skip_tags_on_launch && + !launchConf.ask_diff_mode_on_launch && + !launchConf.survey_enabled && + !launchConf.credential_needed_to_start && + !launchConf.inventory_needed_to_start && + launchConf.passwords_needed_to_start.length === 0 && + launchConf.variables_needed_to_start.length === 0) { $scope.showPromptButton = false; } else { $scope.showPromptButton = true; @@ -446,6 +459,7 @@ function($filter, $state, $stateParams, Wait, $scope, moment, launchOptions: launchOptions, prompts: prompts, surveyQuestions: surveyQuestionRes.data.spec, + templateType: ParentObject.type, template: ParentObject.id }; @@ -467,6 +481,7 @@ function($filter, $state, $stateParams, Wait, $scope, moment, launchConf: launchConf, launchOptions: launchOptions, prompts: prompts, + templateType: ParentObject.type, template: ParentObject.id }; watchForPromptChanges();