From 60c08149fc23a1d70ff4157f1acb719bb8b8623e Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Mon, 20 Jun 2016 15:16:51 -0400 Subject: [PATCH] Added breadcrumb for inventory sync schedule state --- .../manage/breadcrumbs/breadcrumbs.controller.js | 6 +++--- .../inventories/manage/breadcrumbs/breadcrumbs.partial.html | 2 +- .../src/inventories/manage/groups/groups-list.controller.js | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.controller.js b/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.controller.js index 96501e29f6..1f7bbc8cd8 100644 --- a/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.controller.js +++ b/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.controller.js @@ -14,8 +14,8 @@ export default $scope.inventory = inventoryData; $scope.state = $state; // slices the group stack at $index to supply new group params to $state.go() - $scope.goToGroup = function($index){ - var group = $stateParams.group.slice(0, $index); + $scope.goToGroup = function(index){ + var group = $stateParams.group.slice(0, index); $state.go('inventoryManage', {group: group}, {reload: true}); }; $scope.isRootState = function(){ @@ -24,4 +24,4 @@ export default $scope.goToInventory = function(){ $state.go('inventoryManage', {group: undefined}, {reload: true}); }; - }]; \ No newline at end of file + }]; diff --git a/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.partial.html b/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.partial.html index 5ee645542f..baa630ac18 100644 --- a/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.partial.html +++ b/awx/ui/client/src/inventories/manage/breadcrumbs/breadcrumbs.partial.html @@ -17,7 +17,7 @@ diff --git a/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js index 8f066d4788..d6c70479c0 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js @@ -112,7 +112,11 @@ $state.go('inventoryManage', {failed: true}, {reload: true}); }; $scope.scheduleGroup = function(id) { - $state.go('inventoryManage.schedules', {id: id}); + // Add this group's id to the array of group id's so that it gets + // added to the breadcrumb trail + var groupsArr = $stateParams.group ? $stateParams.group : []; + groupsArr.push(id); + $state.go('inventoryManage.schedules', {id: id, group: groupsArr}, {reload: true}); }; // $scope.$parent governed by InventoryManageController, for unified multiSelect options $scope.$on('multiSelectList.selectionChanged', (event, selection) => {