From cd46aeb4ece96ba6efcd39df9f30ea9270e405d8 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Mon, 15 May 2017 15:53:40 -0400 Subject: [PATCH] Remove scan logic from Callback factory and update System Tracking prompts --- .../client/src/system-tracking/system-tracking.partial.html | 4 ++-- awx/ui/client/src/templates/job-template.form.js | 4 +--- .../add-job-template/job-template-add.controller.js | 6 ------ .../edit-job-template/job-template-edit.controller.js | 6 ------ .../job_templates/factories/callback-help-init.factory.js | 4 ---- 5 files changed, 3 insertions(+), 21 deletions(-) diff --git a/awx/ui/client/src/system-tracking/system-tracking.partial.html b/awx/ui/client/src/system-tracking/system-tracking.partial.html index 6667ba87dd..f920a0fdee 100644 --- a/awx/ui/client/src/system-tracking/system-tracking.partial.html +++ b/awx/ui/client/src/system-tracking/system-tracking.partial.html @@ -1,7 +1,7 @@

- To set up scan jobs, create a job template of type 'scan' that targets the "{{inventory.name}}" inventory. + To set up scan jobs, create a job template that targets the "{{inventory.name}}" inventory and check "Store Ansible Facts."

@@ -57,7 +57,7 @@ The two fact scans were identical for this module.

- We were not able to find any facts collected for this inventory or module. To setup or run scan jobs, edit the "{{inventory.name}}" inventory and select "Scan Job Templates." + We were not able to find any facts collected for this inventory or module. To setup or run scan jobs, edit the "{{inventory.name}}" inventory and check "Store Ansible Facts."

run") + "

" + i18n.sprintf(i18n._("Setting the type to %s will not execute the playbook."), "check") + " " + i18n.sprintf(i18n._("Instead, %s will check playbook " + - " syntax, test environment setup and report problems."), "ansible") + "

", + " syntax, test environment setup and report problems."), "ansible") + "

", dataTitle: i18n._('Job Type'), dataPlacement: 'right', dataContainer: "body", subCheckbox: { variable: 'ask_job_type_on_launch', - ngShow: true, text: i18n._('Prompt on launch'), ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)' }, @@ -88,7 +87,6 @@ function(NotificationsList, CompletedJobsList, i18n) { subCheckbox: { variable: 'ask_inventory_on_launch', ngChange: 'job_template_form.inventory_name.$validate()', - ngShow: true, text: i18n._('Prompt on launch') }, ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)' diff --git a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js index 037e4e320c..f332a4f73a 100644 --- a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js +++ b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js @@ -168,12 +168,6 @@ }; $scope.jobTypeChange = function() { - if ($scope.job_type && $scope.project_name === "Default") { - $scope.project_name = null; - $scope.playbook_options = []; - $scope.playbook = ""; - $scope.job_template_form.playbook.$setPristine(); - } sync_playbook_select2(); }; diff --git a/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js b/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js index e6d39a057e..ffe84b281d 100644 --- a/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js +++ b/awx/ui/client/src/templates/job_templates/edit-job-template/job-template-edit.controller.js @@ -127,12 +127,6 @@ export default }; $scope.jobTypeChange = function() { - if ($scope.job_type && $scope.project_name === "Default") { - $scope.project_name = null; - $scope.playbook_options = []; - $scope.playbook = ""; - $scope.job_template_form.playbook.$setPristine(); - } sync_playbook_select2(); }; diff --git a/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js b/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js index e9018dd182..5f7f6318d6 100644 --- a/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js +++ b/awx/ui/client/src/templates/job_templates/factories/callback-help-init.factory.js @@ -133,10 +133,6 @@ export default scope.can_edit = data.summary_fields.user_capabilities.edit; - if (scope.job_type.value === "scan" && (!scope.project || scope.project === "") && (!scope.playbook || scope.playbook === "")) { - scope.resetProjectToDefault(); - } - scope.$emit('jobTemplateLoaded', data.related.cloud_credential, master); }) .error(function (data, status) {