1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Merge pull request #2700 from mabashian/2685

Show breadcrumb on group/host edit refresh
This commit is contained in:
Michael Abashian 2016-06-30 11:32:41 -04:00 committed by GitHub
commit 5a43f7691b
4 changed files with 15 additions and 1 deletions

View File

@ -13,6 +13,11 @@ export default
});
$scope.inventory = inventoryData;
$scope.currentState = $state.current.name;
// The ncy breadcrumb directive will look at this attribute when attempting to bind to the correct scope.
// In this case, we don't want to incidentally bind to this scope when editing a host or a group. See:
// https://github.com/ncuillery/angular-breadcrumb/issues/42 for a little more information on the
// problem that this solves.
$scope.ncyBreadcrumbIgnore = true;
// 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);

View File

@ -17,7 +17,6 @@
<a href ng-click="goToGroup($index+1)">{{group.name}}</a>
</li>
<li class="BreadCrumb-item" ng-if="currentState !== 'inventoryManage'"></li>
</span>
<div class="InventoryManageBreadCrumb-ncy" ng-if="!licenseMissing" ncy-breadcrumb></div>
</ol>
<div class="BreadCrumb-menuLink"

View File

@ -12,6 +12,11 @@
view = generateList,
pageSize = 20;
$scope.inventory_id = $stateParams.inventory_id;
// The ncy breadcrumb directive will look at this attribute when attempting to bind to the correct scope.
// In this case, we don't want to incidentally bind to this scope when editing a host or a group. See:
// https://github.com/ncuillery/angular-breadcrumb/issues/42 for a little more information on the
// problem that this solves.
$scope.ncyBreadcrumbIgnore = true;
if($state.current.name === "inventoryManage.editGroup") {
$scope.rowBeingEdited = $state.params.group_id;
$scope.listBeingEdited = "groups";

View File

@ -11,6 +11,11 @@
var list = InventoryHosts,
view = generateList,
pageSize = 20;
// The ncy breadcrumb directive will look at this attribute when attempting to bind to the correct scope.
// In this case, we don't want to incidentally bind to this scope when editing a host or a group. See:
// https://github.com/ncuillery/angular-breadcrumb/issues/42 for a little more information on the
// problem that this solves.
$scope.ncyBreadcrumbIgnore = true;
if($state.current.name === "inventoryManage.editHost") {
$scope.rowBeingEdited = $state.params.host_id;
$scope.listBeingEdited = "hosts";