Merge pull request #6850 from mabashian/6760-host-link

Fixed linkout associate group/host name
This commit is contained in:
Michael Abashian 2017-07-01 22:07:50 -04:00 committed by GitHub
commit a03d368e85
2 changed files with 6 additions and 10 deletions

View File

@ -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',
@ -107,10 +107,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');
};
});
}];

View File

@ -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;
@ -98,10 +98,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');
};
});
}];