From 92bba3a87c494e5879691f924589297837d17c0e Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Thu, 3 Jul 2014 02:53:58 -0400 Subject: [PATCH] Inventory edit After making changes the inventory list was not refreshing. --- awx/ui/static/js/controllers/Inventories.js | 1 + awx/ui/static/js/helpers/inventory.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index 4b44585f8f..5777cb4ca6 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -169,6 +169,7 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com } $scope.removeRefreshInventories = $scope.$on('RefreshInventories', function () { // Reflect changes after inventory properties edit completes + console.log('here!!'); $scope.search(list.iterator); }); diff --git a/awx/ui/static/js/helpers/inventory.js b/awx/ui/static/js/helpers/inventory.js index 6858aa497c..9fe27a5596 100644 --- a/awx/ui/static/js/helpers/inventory.js +++ b/awx/ui/static/js/helpers/inventory.js @@ -354,6 +354,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis catch(err) { // ignore } + parent_scope.$emit('RefreshInventories'); scope.$destroy(); }); @@ -382,8 +383,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis scope.saveModal = function () { scope.inventory_id = inventory_id; - parent_scope.inventory_name = scope.inventory_name; - SaveInventory({ scope: scope }); + SaveInventory({ scope: scope, parent_scope: parent_scope }); }; };