From 700d4c3c5b55110ada23def4b455a2945e3d2f80 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 2 Aug 2017 16:05:40 -0400 Subject: [PATCH] Fixed adhoc routing --- .../related/groups/list/groups-list.controller.js | 2 +- .../nested-groups/group-nested-groups-list.controller.js | 2 +- .../nested-hosts/group-nested-hosts-list.controller.js | 2 +- .../inventories/related/hosts/list/host-list.controller.js | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js index 2eaffe2ad6..d0a16f11ea 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js @@ -179,7 +179,7 @@ return item.name; }).value().join(':'); - $state.go('^.adhoc', {pattern: pattern}); + $state.go('inventories.edit.adhoc', {pattern: pattern}); }; }]; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js index b4dcfe8736..e19587fcc6 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js @@ -154,7 +154,7 @@ return item.name; }).value().join(':'); - $state.go('^.^.^.adhoc', {pattern: pattern}); + $state.go('inventories.edit.adhoc', {pattern: pattern}); }; }]; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js index a6adaad5a2..1a3d565144 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js @@ -168,6 +168,6 @@ export default ['$scope', 'NestedHostsListDefinition', '$rootScope', 'GetBasePat return item.name; }).value().join(':'); - $state.go('^.^.^.adhoc', {pattern: pattern}); + $state.go('inventories.edit.adhoc', {pattern: pattern}); }; }]; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js index 7f51502a20..81e0de24ed 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/list/host-list.controller.js @@ -160,6 +160,11 @@ export default ['$scope', 'ListDefinition', '$rootScope', 'GetBasePath', return item.name; }).value().join(':'); - $state.go('^.adhoc', {pattern: pattern}); + if($state.includes('inventories.edit')) { + $state.go('inventories.edit.adhoc', {pattern: pattern}); + } + else if($state.includes('inventories.editSmartInventory')) { + $state.go('inventories.editSmartInventory.adhoc', {pattern: pattern}); + } }; }];