1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Merge pull request #143 from jlmitch5/jlm_414_hosts_button_at_inv_root

got add hosts button to work at root level of inventory
This commit is contained in:
jlmitch5 2015-04-14 18:53:34 -04:00
commit 2fbfdce12c
2 changed files with 7 additions and 2 deletions

View File

@ -607,8 +607,14 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
});
}
else {
if (selected_group_id) {
// adding hosts to a group
url = GetBasePath('groups') + selected_group_id + '/';
} else {
// adding hosts to the top-level (inventory)
url = GetBasePath('inventory') + inventory_id + '/';
}
// Add mode
url = GetBasePath('groups') + selected_group_id + '/';
Rest.setUrl(url);
Rest.get()
.success( function(data) {

View File

@ -90,7 +90,6 @@ export default
create: {
mode: 'all',
ngClick: "createHost()",
ngHide: '!selected_group_id', //disable when 'All Hosts' selected
awToolTip: "Create a new host"
},
refresh: {