From bef94f0c620d13bce2bfa7253f2c2cef407b1c03 Mon Sep 17 00:00:00 2001 From: mabashian Date: Tue, 25 Jul 2017 10:59:06 -0400 Subject: [PATCH] Fixed org inventory name link --- .../controllers/organizations-inventories.controller.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js index cd2a8508df..b11c534bd4 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js @@ -235,8 +235,13 @@ export default ['$scope', '$rootScope', '$location', }; - $scope.editInventory = function(id) { - $state.go('inventories.edit', { inventory_id: id }); + $scope.editInventory = function (inventory) { + if(inventory.kind && inventory.kind === 'smart') { + $state.go('inventories.editSmartInventory', {smartinventory_id: inventory.id}); + } + else { + $state.go('inventories.edit', {inventory_id: inventory.id}); + } }; // Failed jobs link. Go to the jobs tabs, find all jobs for the inventory and sort by status