mirror of
https://github.com/ansible/awx.git
synced 2026-04-11 21:19:22 -02:30
adding host resolve for nested groups route
This commit is contained in:
@@ -66,8 +66,15 @@ export default ['$stateExtender', 'templateUrl', '$injector',
|
|||||||
return qs.search(path, $stateParams[`${list.iterator}_search`]);
|
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) {
|
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);
|
return InventoryManageService.getInventory(id).then(res => res.data);
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user