From 9eda282e8d323e1ab4b6ee7fe6223d6f75b7bc87 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Fri, 30 Jun 2017 19:18:12 -0400 Subject: [PATCH] Fixed linkout associate group/host name --- .../associate-groups/associate-groups.controller.js | 8 +++----- .../shared/associate-hosts/associate-hosts.controller.js | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js b/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js index f6f4fc4bed..052b6ec374 100644 --- a/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js +++ b/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js @@ -33,7 +33,7 @@ list.iterator = 'associate_group'; list.name = 'associate_groups'; list.multiSelect = true; - list.fields.name.ngClick = 'linkoutGroup(associate_group.id)'; + list.fields.name.ngClick = 'linkoutGroup(associate_group)'; list.trackBy = 'associate_group.id'; list.multiSelectPreview = { selectedRows: 'selectedItems', @@ -106,10 +106,8 @@ }; - $scope.linkoutGroup = function(userId) { - // Open the edit user form in a new tab so as not to navigate the user - // away from the modal - $window.open('/#/users/' + userId,'_blank'); + $scope.linkoutGroup = function(group) { + $window.open('/#/inventories/inventory/' + group.inventory + '/groups/edit/' + group.id,'_blank'); }; }); }]; diff --git a/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js b/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js index d60800ab76..db063c02ae 100644 --- a/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js +++ b/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js @@ -28,7 +28,7 @@ list.iterator = 'associate_host'; list.name = 'associate_hosts'; list.multiSelect = true; - list.fields.name.ngClick = 'linkoutHost(associate_host.id)'; + list.fields.name.ngClick = 'linkoutHost(associate_host)'; list.trackBy = 'associate_host.id'; delete list.fields.toggleHost; delete list.fields.active_failures; @@ -97,10 +97,8 @@ }; - $scope.linkoutHost = function(userId) { - // Open the edit user form in a new tab so as not to navigate the user - // away from the modal - $window.open('/#/users/' + userId,'_blank'); + $scope.linkoutHost = function(host) { + $window.open('/#/inventories/inventory/' + host.inventory + '/hosts/edit/' + host.id,'_blank'); }; }); }];