mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
adding host resolve for nested groups route
This commit is contained in:
parent
4820a3dca3
commit
6de87b910b
@ -66,8 +66,15 @@ export default ['$stateExtender', 'templateUrl', '$injector',
|
||||
return qs.search(path, $stateParams[`${list.iterator}_search`]);
|
||||
}
|
||||
],
|
||||
host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) {
|
||||
if($stateParams.host_id){
|
||||
return HostManageService.get({ id: $stateParams.host_id }).then(function(res) {
|
||||
return res.data.results[0];
|
||||
});
|
||||
}
|
||||
}],
|
||||
inventoryData: ['InventoryManageService', '$stateParams', 'host', function(InventoryManageService, $stateParams, host) {
|
||||
var id = ($stateParams.inventory_id) ? $stateParams.inventory_id : host.data.summary_fields.inventory.id;
|
||||
var id = ($stateParams.inventory_id) ? $stateParams.inventory_id : host.summary_fields.inventory.id;
|
||||
return InventoryManageService.getInventory(id).then(res => res.data);
|
||||
}]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user