mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
Inventory hosts now appear in All Hosts folder. User not allowed to add hosts outside of a group (i.e. cannot add to All Hosts group). Fixed job template so that a credential can be removed.
This commit is contained in:
@@ -343,7 +343,8 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
};
|
||||
|
||||
scope.treeController = function($node) {
|
||||
if ($($node).attr('type') == 'host') {
|
||||
var nodeType = $($node).attr('type');
|
||||
if (nodeType == 'host') {
|
||||
return {
|
||||
edit: {
|
||||
label: 'Edit Host',
|
||||
@@ -386,7 +387,7 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($($node).attr('type') == 'inventory') {
|
||||
else if (nodeType == 'inventory') {
|
||||
return {
|
||||
addGroup: {
|
||||
label: 'Add Group',
|
||||
@@ -411,19 +412,22 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
action: function(obj) {
|
||||
LoadBreadCrumbs({ path: '/groups/' + $(obj).attr('id'), title: $(obj).attr('name') });
|
||||
changePath($location.path() + '/groups/' + $(obj).attr('id') + '/children');
|
||||
}
|
||||
},
|
||||
"_disabled": (nodeType == 'all-hosts-group') ? true : false
|
||||
},
|
||||
addHost: {
|
||||
label: 'Add Host',
|
||||
action: function(obj) {
|
||||
LoadBreadCrumbs({ path: '/groups/' + $(obj).attr('id'), title: $(obj).attr('name') });
|
||||
changePath($location.path() + '/groups/' + $(obj).attr('id') + '/hosts');
|
||||
}
|
||||
},
|
||||
"_disabled": (nodeType == 'all-hosts-group') ? true : false
|
||||
},
|
||||
edit: {
|
||||
label: 'Edit Group',
|
||||
action: function(obj) { changePath($location.path() + '/groups/' + $(obj).attr('id')); },
|
||||
separator_before: true
|
||||
separator_before: true,
|
||||
"_disabled": (nodeType == 'all-hosts-group') ? true : false
|
||||
},
|
||||
delete: {
|
||||
label: 'Delete Group',
|
||||
@@ -454,7 +458,8 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
keyboard: true,
|
||||
show: true
|
||||
});
|
||||
}
|
||||
},
|
||||
"_disabled": (nodeType == 'all-hosts-group') ? true : false
|
||||
},
|
||||
variables: {
|
||||
label: 'Group variables',
|
||||
|
||||
@@ -475,7 +475,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
|
||||
|
||||
// Save changes to the parent
|
||||
scope.formSave = function() {
|
||||
Rest.setUrl(defaultUrl + $routeParams.id);
|
||||
Rest.setUrl(defaultUrl + $routeParams.id + '/');
|
||||
var data = {}
|
||||
for (var fld in form.fields) {
|
||||
if (form.fields[fld].type == 'select' && fld != 'playbook') {
|
||||
|
||||
Reference in New Issue
Block a user