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}); + } }; }];