From efe608cf2e4f24c0a6be8f648e4e262493b7a01d Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Fri, 9 Jun 2017 11:40:58 -0400 Subject: [PATCH] Fixed verbosity select on inventory source form --- .../sources/add/sources-add.controller.js | 18 ++++-------------- .../src/inventories/sources/sources.form.js | 1 - 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/awx/ui/client/src/inventories/sources/add/sources-add.controller.js b/awx/ui/client/src/inventories/sources/add/sources-add.controller.js index 3e8a77c09f..f5db7e9076 100644 --- a/awx/ui/client/src/inventories/sources/add/sources-add.controller.js +++ b/awx/ui/client/src/inventories/sources/add/sources-add.controller.js @@ -171,13 +171,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', initRegionSelect(); }; // region / source options callback - $scope.$on('choicesReadyGroup', function() { - initRegionSelect(); - }); - - $scope.$on('choicesReadyVerbosity', function() { - initVerbositySelect(); - }); $scope.$on('sourceTypeOptionsReady', function() { initSourceSelect(); @@ -216,7 +209,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', field: 'source_regions', variable: 'rax_regions', choice_name: 'rax_region_choices', - callback: 'choicesReadyGroup', options: inventorySourcesOptions }); @@ -225,7 +217,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', field: 'source_regions', variable: 'ec2_regions', choice_name: 'ec2_region_choices', - callback: 'choicesReadyGroup', options: inventorySourcesOptions }); @@ -234,7 +225,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', field: 'source_regions', variable: 'gce_regions', choice_name: 'gce_region_choices', - callback: 'choicesReadyGroup', options: inventorySourcesOptions }); @@ -243,7 +233,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', field: 'source_regions', variable: 'azure_regions', choice_name: 'azure_region_choices', - callback: 'choicesReadyGroup', options: inventorySourcesOptions }); @@ -253,22 +242,23 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', field: 'group_by', variable: 'ec2_group_by', choice_name: 'ec2_group_by_choices', - callback: 'choicesReadyGroup', options: inventorySourcesOptions }); + initRegionSelect(); + GetChoices({ scope: $scope, field: 'verbosity', variable: 'verbosity_options', - callback: 'choicesReadyVerbosity', options: inventorySourcesOptions }); + initVerbositySelect(); + GetSourceTypeOptions({ scope: $scope, variable: 'source_type_options' - //callback: 'sourceTypeOptionsReady' this callback is hard-coded into GetSourceTypeOptions(), included for ref }); } diff --git a/awx/ui/client/src/inventories/sources/sources.form.js b/awx/ui/client/src/inventories/sources/sources.form.js index 3ab68e5a8e..60c821c5c9 100644 --- a/awx/ui/client/src/inventories/sources/sources.form.js +++ b/awx/ui/client/src/inventories/sources/sources.form.js @@ -286,7 +286,6 @@ return { ngOptions: 'v.label for v in verbosity_options track by v.value', ngShow: "source && (source.value !== '' && source.value !== null)", "default": 0, - required: true, column: 1, awPopOver: "

" + i18n._("Control the level of output ansible will produce for inventory source update jobs.") + "

", dataTitle: i18n._('Verbosity'),