Fixed related host list linking

This commit is contained in:
mabashian 2017-10-25 16:59:44 -04:00
parent 652facba9f
commit 947bdeed3e
No known key found for this signature in database
GPG Key ID: 436B8D5EDC704CE3

View File

@ -92,7 +92,12 @@ export default ['$scope', 'ListDefinition', '$rootScope', 'GetBasePath',
$state.go('inventories.edit.hosts.add');
};
$scope.editHost = function(host){
$state.go('.edit', {inventory_id: host.inventory_id, host_id: host.id});
if($state.includes('inventories.edit.hosts')) {
$state.go('inventories.edit.hosts.edit', {host_id: host.id});
}
else if($state.includes('inventories.editSmartInventory.hosts')) {
$state.go('inventories.editSmartInventory.hosts.edit', {host_id: host.id});
}
};
$scope.goToInsights = function(host){
$state.go('inventories.edit.hosts.edit.insights', {inventory_id: host.inventory_id, host_id:host.id});