From 83e79724d103c76b0b8b6afec93717a809f27b2c Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Wed, 13 Apr 2016 14:37:18 -0400 Subject: [PATCH] resolve jshint merge conflicts --- awx/ui/client/src/controllers/Teams.js | 22 ++++----- awx/ui/client/src/controllers/Users.js | 13 +++--- awx/ui/client/src/helpers/Credentials.js | 2 +- awx/ui/client/src/helpers/Groups.js | 2 +- awx/ui/client/src/helpers/Jobs.js | 13 +++--- awx/ui/client/src/helpers/Schedules.js | 17 +++---- awx/ui/client/src/helpers/refresh.js | 14 +++--- awx/ui/client/src/helpers/search.js | 2 +- .../add/inventory-add.controller.js | 2 +- awx/ui/client/src/inventories/add/main.js | 1 - awx/ui/client/src/inventories/edit/main.js | 1 - awx/ui/client/src/inventories/list/main.js | 1 - .../manage/copy/copy-groups.controller.js | 23 ++++++---- .../manage/copy/copy-hosts.controller.js | 46 +++++++++---------- .../manage/copy/copy.controller.js | 6 +-- .../manage/inventory-manage.controller.js | 4 +- .../manage-groups.directive.controller.js | 18 ++++---- .../host-event/host-event.controller.js | 2 +- 18 files changed, 93 insertions(+), 96 deletions(-) diff --git a/awx/ui/client/src/controllers/Teams.js b/awx/ui/client/src/controllers/Teams.js index 368f8c70b3..280f40c4c1 100644 --- a/awx/ui/client/src/controllers/Teams.js +++ b/awx/ui/client/src/controllers/Teams.js @@ -188,7 +188,7 @@ TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', ]; -export function TeamsEdit($scope, $rootScope, $location, +export function TeamsEdit($scope, $rootScope, $location, $stateParams, TeamForm, GenerateForm, Rest, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ClearScope, LookUpInit, GetBasePath, OrganizationList, Wait, $state) { @@ -198,8 +198,6 @@ export function TeamsEdit($scope, $rootScope, $location, var defaultUrl = GetBasePath('teams'), generator = GenerateForm, form = TeamForm, - base = $location.path().replace(/^\//, '').split('/')[0], - master = {}, id = $stateParams.team_id, relatedSets = {}; @@ -207,7 +205,7 @@ export function TeamsEdit($scope, $rootScope, $location, generator.inject(form, { mode: 'edit', related: true, scope: $scope }); - generator.reset() + generator.reset(); var setScopeFields = function(data){ _(data) @@ -218,7 +216,7 @@ export function TeamsEdit($scope, $rootScope, $location, $scope[key] = value; }) .value(); - return + return; }; var setScopeRelated = function(data, related){ _(related) @@ -242,7 +240,7 @@ export function TeamsEdit($scope, $rootScope, $location, data[key] = $scope[key]; } }); - return data + return data; }; var init = function(){ @@ -251,7 +249,7 @@ export function TeamsEdit($scope, $rootScope, $location, Wait('start'); Rest.get(url).success(function(data){ setScopeFields(data); - setScopeRelated(data, form.related) + setScopeRelated(data, form.related); $scope.organization_name = data.summary_fields.organization.name; RelatedSearchInit({ @@ -275,11 +273,11 @@ export function TeamsEdit($scope, $rootScope, $location, input_type: 'radio' }); }); - } + }; $scope.formCancel = function(){ $state.go('teams', null, {reload: true}); - } + }; $scope.formSave = function(){ generator.clearApiErrors(); @@ -288,13 +286,13 @@ export function TeamsEdit($scope, $rootScope, $location, if ($scope[form.name + '_form'].$valid){ Rest.setUrl(defaultUrl + id + '/'); var data = processNewData(form.fields); - Rest.put(data).success(function(res){ + Rest.put(data).success(function(){ $state.go('teams', null, {reload: true}); }) .error(function (data, status) { ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to retrieve user: ' + $stateParams.id + '. GET status: ' + status }); - }); + }); } }; @@ -304,7 +302,7 @@ export function TeamsEdit($scope, $rootScope, $location, } TeamsEdit.$inject = ['$scope', '$rootScope', '$location', - '$stateParams', 'TeamForm', 'GenerateForm', 'Rest', + '$stateParams', 'TeamForm', 'GenerateForm', 'Rest', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'ClearScope', 'LookUpInit', 'GetBasePath', 'OrganizationList', 'Wait', '$state' diff --git a/awx/ui/client/src/controllers/Users.js b/awx/ui/client/src/controllers/Users.js index 02d094fd1f..f0679cebf1 100644 --- a/awx/ui/client/src/controllers/Users.js +++ b/awx/ui/client/src/controllers/Users.js @@ -229,7 +229,6 @@ export function UsersEdit($scope, $rootScope, $location, var defaultUrl = GetBasePath('users'), generator = GenerateForm, form = UserForm, - base = $location.path().replace(/^\//, '').split('/')[0], master = {}, id = $stateParams.user_id, relatedSets = {}; @@ -246,7 +245,7 @@ export function UsersEdit($scope, $rootScope, $location, $scope[key] = value; }) .value(); - return + return; }; var setScopeRelated = function(data, related){ @@ -270,7 +269,7 @@ export function UsersEdit($scope, $rootScope, $location, data[key] = $scope[key]; } }); - return data + return data; }; var init = function(){ @@ -315,13 +314,13 @@ export function UsersEdit($scope, $rootScope, $location, if ($scope[form.name + '_form'].$valid){ Rest.setUrl(defaultUrl + id + '/'); var data = processNewData(form.fields); - Rest.put(data).success(function(res){ - $state.go('users', null, {reload: true}) + Rest.put(data).success(function(){ + $state.go('users', null, {reload: true}); }) .error(function (data, status) { ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to retrieve user: ' + $stateParams.id + '. GET status: ' + status }); - }); + }); } }; @@ -338,7 +337,7 @@ export function UsersEdit($scope, $rootScope, $location, } UsersEdit.$inject = ['$scope', '$rootScope', '$location', - '$stateParams', 'UserForm', 'GenerateForm', 'Rest', 'ProcessErrors', + '$stateParams', 'UserForm', 'GenerateForm', 'Rest', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'ClearScope', 'GetBasePath', 'ResetForm', 'Wait', '$state' ]; diff --git a/awx/ui/client/src/helpers/Credentials.js b/awx/ui/client/src/helpers/Credentials.js index 7aa615f86d..48941bb3bb 100644 --- a/awx/ui/client/src/helpers/Credentials.js +++ b/awx/ui/client/src/helpers/Credentials.js @@ -205,7 +205,7 @@ angular.module('CredentialsHelper', ['Utilities']) if (fld !== 'access_key' && fld !== 'secret_key' && fld !== 'ssh_username' && fld !== 'ssh_password') { if (fld === "organization" && !scope[fld]) { - data["user"] = $rootScope.current_user.id; + data.user = $rootScope.current_user.id; } else if (scope[fld] === null) { data[fld] = ""; } else { diff --git a/awx/ui/client/src/helpers/Groups.js b/awx/ui/client/src/helpers/Groups.js index 33fe69cf3d..eec4835195 100644 --- a/awx/ui/client/src/helpers/Groups.js +++ b/awx/ui/client/src/helpers/Groups.js @@ -1008,7 +1008,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name } else if(fld === "inventory_script"){ // the API stores it as 'source_script', we call it inventory_script - data.summary_fields['inventory_script'] = data.summary_fields.source_script; + data.summary_fields.inventory_script = data.summary_fields.source_script; sources_scope.inventory_script = data.source_script; master.inventory_script = sources_scope.inventory_script; } else if (fld === "source_regions") { diff --git a/awx/ui/client/src/helpers/Jobs.js b/awx/ui/client/src/helpers/Jobs.js index 6b0095b6da..065fe0eab7 100644 --- a/awx/ui/client/src/helpers/Jobs.js +++ b/awx/ui/client/src/helpers/Jobs.js @@ -22,8 +22,8 @@ export default * Initialize calling scope with all the bits required to support a jobs list * */ - .factory('JobsControllerInit', ['$state', 'Find', 'DeleteJob', 'RelaunchJob', '$window', - function($state, Find, DeleteJob, RelaunchJob, $window) { + .factory('JobsControllerInit', ['$state', 'Find', 'DeleteJob', 'RelaunchJob', + function($state, Find, DeleteJob, RelaunchJob) { return function(params) { var scope = params.scope, iterator = (params.iterator) ? params.iterator : scope.iterator; @@ -76,7 +76,7 @@ export default var goToJobDetails = function(state) { $state.go(state, {id: job.id}, {reload:true}); - } + }; switch(job.type) { case 'job': @@ -348,8 +348,8 @@ export default * Called from JobsList controller to load each section or list on the page * */ - .factory('LoadJobsScope', ['$stateParams', '$location', '$compile', 'SearchInit', 'PaginateInit', 'generateList', 'JobsControllerInit', 'JobsListUpdate', 'SearchWidget', - function($stateParams, $location, $compile, SearchInit, PaginateInit, GenerateList, JobsControllerInit, JobsListUpdate, SearchWidget) { + .factory('LoadJobsScope', ['$stateParams', '$location', '$compile', 'SearchInit', 'PaginateInit', 'generateList', 'JobsControllerInit', 'JobsListUpdate', + function($stateParams, $location, $compile, SearchInit, PaginateInit, GenerateList, JobsControllerInit, JobsListUpdate) { return function(params) { var parent_scope = params.parent_scope, scope = params.scope, @@ -359,8 +359,7 @@ export default pageSize = params.pageSize || 5, base = $location.path().replace(/^\//, '').split('/')[0], search_params = params.searchParams, - spinner = (params.spinner === undefined) ? true : params.spinner, - e, html, key; + spinner = (params.spinner === undefined) ? true : params.spinner, key; GenerateList.inject(list, { mode: 'edit', diff --git a/awx/ui/client/src/helpers/Schedules.js b/awx/ui/client/src/helpers/Schedules.js index 35f5023b06..5ff780c234 100644 --- a/awx/ui/client/src/helpers/Schedules.js +++ b/awx/ui/client/src/helpers/Schedules.js @@ -20,14 +20,12 @@ export default angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', listGenerator.name, 'ModalDialog', 'GeneratorHelpers']) - .factory('ShowSchedulerModal', ['$rootScope', 'Wait', 'CreateDialog', function($rootScope, Wait, CreateDialog) { + .factory('ShowSchedulerModal', ['$rootScope', function($rootScope) { return function(params) { // Set modal dimensions based on viewport width var buttons, - scope = params.scope, - callback = params.callback, - title = params.title; + scope = params.scope; buttons = [{ "label": "Cancel", @@ -221,12 +219,12 @@ export default if (!Empty($stateParams.template_id)) { url += $stateParams.template_id + '/schedules/'; } - else if (!Empty($stateParams.id) && base != 'system_job_templates') { + else if (!Empty($stateParams.id) && base !== 'system_job_templates') { url += $stateParams.id + '/schedules/'; } - else if (base == 'system_job_templates') { + else if (base === 'system_job_templates') { url += $stateParams.id + '/schedules/'; - if($stateParams.id == 4){ + if($stateParams.id === 4){ scope.isFactCleanup = true; scope.keep_unit_choices = [{ "label" : "Days", @@ -532,9 +530,8 @@ export default .factory('SchedulesControllerInit', ['$state', '$location', 'ToggleSchedule', - 'DeleteSchedule', 'EditSchedule', 'AddSchedule', - function($state, $location, ToggleSchedule, DeleteSchedule, EditSchedule, - AddSchedule) { + 'DeleteSchedule', + function($state, $location, ToggleSchedule, DeleteSchedule) { return function(params) { var scope = params.scope, parent_scope = params.parent_scope, diff --git a/awx/ui/client/src/helpers/refresh.js b/awx/ui/client/src/helpers/refresh.js index 41bb6bf01b..5755cd934e 100644 --- a/awx/ui/client/src/helpers/refresh.js +++ b/awx/ui/client/src/helpers/refresh.js @@ -67,24 +67,26 @@ export default }); }; + var id, restUrl, pageSize; + // if you're editing an object, make sure you're on the right // page to display the element you are editing if (scope.addedItem) { - var id = scope.addedItem + ""; + id = scope.addedItem + ""; delete scope.addedItem; $rootScope.rowBeingEdited = id; $rootScope.listBeingEdited = set; $rootScope.addedAnItem = true; - var restUrl = params.url.split("?")[0]; - var pageSize = scope[iterator + '_page_size']; + restUrl = params.url.split("?")[0]; + pageSize = scope[iterator + '_page_size']; pagination.getInitialPageForList(id, restUrl, pageSize) .then(function (currentPage) { scope.getPage(currentPage, set, iterator); }); } else if ($location.$$url.split("/")[1] === params.set && $location.$$url.split("/")[2] && $location.$$url.split("/")[2] !== "add" && !scope.getNewPage) { - var id = $location.$$url.split("/")[2]; - var restUrl = params.url.split("?")[0]; - var pageSize = scope[iterator + '_page_size']; + id = $location.$$url.split("/")[2]; + restUrl = params.url.split("?")[0]; + pageSize = scope[iterator + '_page_size']; pagination.getInitialPageForList(id, restUrl, pageSize) .then(function (currentPage) { scope[iterator + '_page'] = currentPage; diff --git a/awx/ui/client/src/helpers/search.js b/awx/ui/client/src/helpers/search.js index de68732ed1..cfd917ba55 100644 --- a/awx/ui/client/src/helpers/search.js +++ b/awx/ui/client/src/helpers/search.js @@ -502,7 +502,7 @@ export default scope[set] = []; //clear the list array to make sure 'Loading' is the only thing visible on the list } - if(scope[iterator + 'SearchValue' + modifier] && scope[iterator + 'SearchValue' + modifier] != '') { + if(scope[iterator + 'SearchValue' + modifier] && scope[iterator + 'SearchValue' + modifier] !== '') { scope[iterator + '_active_search'] = true; } else { diff --git a/awx/ui/client/src/inventories/add/inventory-add.controller.js b/awx/ui/client/src/inventories/add/inventory-add.controller.js index bd3cde3041..ceb874f8ec 100644 --- a/awx/ui/client/src/inventories/add/inventory-add.controller.js +++ b/awx/ui/client/src/inventories/add/inventory-add.controller.js @@ -92,4 +92,4 @@ export default['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit', 'PaginateInit', 'LookUpInit', - 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', '$state', InventoriesAdd] + 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', '$state', InventoriesAdd]; diff --git a/awx/ui/client/src/inventories/add/main.js b/awx/ui/client/src/inventories/add/main.js index e12ff940ac..68cfc0052a 100644 --- a/awx/ui/client/src/inventories/add/main.js +++ b/awx/ui/client/src/inventories/add/main.js @@ -5,7 +5,6 @@ *************************************************/ import route from './inventory-add.route'; -import controller from './inventory-add.controller'; export default angular.module('inventoryAdd', []) diff --git a/awx/ui/client/src/inventories/edit/main.js b/awx/ui/client/src/inventories/edit/main.js index 28c99819b7..673c405243 100644 --- a/awx/ui/client/src/inventories/edit/main.js +++ b/awx/ui/client/src/inventories/edit/main.js @@ -5,7 +5,6 @@ *************************************************/ import route from './inventory-edit.route'; -import controller from './inventory-edit.controller'; export default angular.module('inventoryEdit', []) diff --git a/awx/ui/client/src/inventories/list/main.js b/awx/ui/client/src/inventories/list/main.js index 4d67816cd7..428f4d9cd2 100644 --- a/awx/ui/client/src/inventories/list/main.js +++ b/awx/ui/client/src/inventories/list/main.js @@ -5,7 +5,6 @@ *************************************************/ import route from './inventory-list.route'; -import controller from './inventory-list.controller'; export default angular.module('inventoryList', []) diff --git a/awx/ui/client/src/inventories/manage/copy/copy-groups.controller.js b/awx/ui/client/src/inventories/manage/copy/copy-groups.controller.js index 480eb38b4e..4690bb9b62 100644 --- a/awx/ui/client/src/inventories/manage/copy/copy-groups.controller.js +++ b/awx/ui/client/src/inventories/manage/copy/copy-groups.controller.js @@ -3,18 +3,21 @@ function CopyGroupsCtrl($compile, $state, $scope, $location, Rest, ProcessErrors var vm = this; var name; - var params = ParamPass.get(); + var params = ParamPass.get(), + group_id, + parent_scope, + scope; if (params !== undefined) { - var group_id = $state.params.group_id, - parent_scope = params.scope, - scope = parent_scope.$new(), - parent_group = parent_scope.selected_group_id, + group_id = $state.params.group_id; + parent_scope = params.scope; + scope = parent_scope.$new(); + var parent_group = parent_scope.selected_group_id, url, group; } else { - var group_id = $state.params.group_id; - var parent_scope = $scope.$new(); - var scope = parent_scope.$new(); + group_id = $state.params.group_id; + parent_scope = $scope.$new(); + scope = parent_scope.$new(); } var inventory_id = $state.params.inventory_id; @@ -132,7 +135,7 @@ function CopyGroupsCtrl($compile, $state, $scope, $location, Rest, ProcessErrors }); $scope.refreshHostsOnGroupRefresh = true; //$scope.search(InventoryGroups.iterator, null, true, false, true); - } + }; var cancel = function() { restoreSearch(); // Restore all parent search stuff and refresh hosts and groups lists @@ -296,7 +299,7 @@ function CopyGroupsCtrl($compile, $state, $scope, $location, Rest, ProcessErrors name: name, allowSave: allowSave }); -}; +} export default ['$compile', '$state', '$scope', '$location', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit', 'PaginateInit', 'GetRootGroups', 'ParamPass', 'Store', CopyGroupsCtrl diff --git a/awx/ui/client/src/inventories/manage/copy/copy-hosts.controller.js b/awx/ui/client/src/inventories/manage/copy/copy-hosts.controller.js index 1102d934c8..3883fed6ad 100644 --- a/awx/ui/client/src/inventories/manage/copy/copy-hosts.controller.js +++ b/awx/ui/client/src/inventories/manage/copy/copy-hosts.controller.js @@ -4,18 +4,18 @@ function CopyHostsCtrl($compile, $state, $scope, Rest, ProcessErrors, CreateDial var host_id = $state.params.host_id; var inventory_id = $state.params.inventory_id; - var url, host; + var url, host, group_scope, parent_scope, scope, parent_group; var params = ParamPass.get(); if (params !== undefined) { - var group_scope = params.group_scope, - parent_scope = params.host_scope, - parent_group = group_scope.selected_group_id, - scope = parent_scope.$new(); + group_scope = params.group_scope; + parent_scope = params.host_scope; + parent_group = group_scope.selected_group_id; + scope = parent_scope.$new(); } else { - var group_scope = $scope.$new(); - var parent_scope = $scope.$new(); - var scope = parent_scope.$new(); + group_scope = $scope.$new(); + parent_scope = $scope.$new(); + scope = parent_scope.$new(); } var PreviousSearchParams = Store('group_current_search_params'); @@ -91,6 +91,21 @@ function CopyHostsCtrl($compile, $state, $scope, Rest, ProcessErrors, CreateDial }); }); + var restoreSearch = function() { + // Restore search params and related stuff, plus refresh + // groups and hosts lists + SearchInit({ + scope: $scope, + set: PreviousSearchParams.set, + list: PreviousSearchParams.list, + url: PreviousSearchParams.defaultUrl, + iterator: PreviousSearchParams.iterator, + sort_order: PreviousSearchParams.sort_order, + setWidgets: false + }); + $scope.refreshHostsOnGroupRefresh = true; + }; + var cancel = function() { $(document).off("keydown"); restoreSearch(); // Restore all parent search stuff and refresh hosts and groups lists @@ -129,21 +144,6 @@ function CopyHostsCtrl($compile, $state, $scope, Rest, ProcessErrors, CreateDial } }; - var restoreSearch = function() { - // Restore search params and related stuff, plus refresh - // groups and hosts lists - SearchInit({ - scope: $scope, - set: PreviousSearchParams.set, - list: PreviousSearchParams.list, - url: PreviousSearchParams.defaultUrl, - iterator: PreviousSearchParams.iterator, - sort_order: PreviousSearchParams.sort_order, - setWidgets: false - }); - $scope.refreshHostsOnGroupRefresh = true; - }; - var performCopy = function() { var list = GroupList, target, diff --git a/awx/ui/client/src/inventories/manage/copy/copy.controller.js b/awx/ui/client/src/inventories/manage/copy/copy.controller.js index f16525d057..144f55da70 100644 --- a/awx/ui/client/src/inventories/manage/copy/copy.controller.js +++ b/awx/ui/client/src/inventories/manage/copy/copy.controller.js @@ -1,16 +1,16 @@ function inventoryManageCopyCtrl($state) { var vm = this; - + var cancelPanel = function() { $state.go('inventoryManage', {}, { reload: true - }) + }); }; angular.extend(vm, { cancelPanel: cancelPanel }); -}; +} export default ['$state', inventoryManageCopyCtrl ]; diff --git a/awx/ui/client/src/inventories/manage/inventory-manage.controller.js b/awx/ui/client/src/inventories/manage/inventory-manage.controller.js index 382938e3bd..96dd9a9936 100644 --- a/awx/ui/client/src/inventories/manage/inventory-manage.controller.js +++ b/awx/ui/client/src/inventories/manage/inventory-manage.controller.js @@ -342,7 +342,7 @@ function InventoriesManage($log, $scope, $rootScope, $location, inventory_id: $scope.inventory.id, group_id: $scope.selected_group_id, mode: 'add' - } + }; ParamPass.set(params); $state.go('inventoryManage.addGroup'); }; @@ -354,7 +354,7 @@ function InventoriesManage($log, $scope, $rootScope, $location, inventory_id: $scope.inventory.id, group_id: id, mode: 'edit' - } + }; ParamPass.set(params); $state.go('inventoryManage.editGroup', {group_id: id}); }; diff --git a/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js b/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js index 0b57ddbf1e..58372de828 100644 --- a/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js +++ b/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js @@ -60,12 +60,14 @@ function manageGroupsDirectiveController($filter, $location, $log, $scope.parseType = 'yaml'; - generator.inject(form, { - mode: mode, - id: 'group-manage-panel', - tabs: true, - scope: $scope - }); + var form_scope = + generator.inject(GroupForm, { + mode: mode, + id: 'properties-tab', + related: false, + scope: properties_scope, + cancelButton: false, + }); generator.reset(); @@ -74,13 +76,13 @@ function manageGroupsDirectiveController($filter, $location, $log, variable: 'source_type_options' }); - $scope.source = form.fields.source['default']; $scope.sourcePathRequired = false; $scope[form.fields.source_vars.parseTypeName] = 'yaml'; $scope.update_cache_timeout = 0; $scope.parseType = 'yaml'; + function initSourceChange() { $scope.showSchedulesTab = (mode === 'edit' && $scope.source && $scope.source.value !== "manual") ? true : false; SourceChange({ @@ -144,7 +146,7 @@ function manageGroupsDirectiveController($filter, $location, $log, master.source_vars = $scope.variables; } else if (fld === "inventory_script") { // the API stores it as 'source_script', we call it inventory_script - data.summary_fields['inventory_script'] = data.summary_fields.source_script; + data.summary_fields.inventory_script = data.summary_fields.source_script; $scope.inventory_script = data.source_script; master.inventory_script = $scope.inventory_script; } else if (fld === "source_regions") { diff --git a/awx/ui/client/src/job-detail/host-event/host-event.controller.js b/awx/ui/client/src/job-detail/host-event/host-event.controller.js index 17572941d9..786bb5ff7d 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event.controller.js +++ b/awx/ui/client/src/job-detail/host-event/host-event.controller.js @@ -76,4 +76,4 @@ $('#HostEvent').modal('show'); }; init(); - }]; \ No newline at end of file + }];