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

Fixed a bug in Groups.js helper that blocked GroupsEdit, so you couldn't edit an existing group. Issue was Angular depenedency ineject was misaligned with function parameters.

This commit is contained in:
Chris Houseknecht 2014-02-13 19:52:37 +00:00
parent c77db691eb
commit 6a3e477c9a
2 changed files with 5 additions and 8 deletions

View File

@ -331,8 +331,6 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
scope = generator.inject(form, { mode: 'add', modal: true, related: false, show_modal: false }),
choicesReady;
$('#form-modal .btn-none').removeClass('btn-none').addClass('btn-success');
scope.formModalActionLabel = 'Save';
scope.formModalCancelShow = true;
scope.parseType = 'yaml';
@ -564,8 +562,8 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
'Prompt', 'ProcessErrors', 'GetBasePath', 'SetNodeName', 'ParseTypeChange', 'GetSourceTypeOptions', 'InventoryUpdate',
'LookUpInit', 'Empty', 'Wait', 'GetChoices', 'UpdateGroup', 'SourceChange', 'Find','WatchInventoryWindowResize',
function ($rootScope, $location, $log, $routeParams, Rest, Alert, GroupForm, GenerateForm, Prompt, ProcessErrors,
GetBasePath, SetNodeName, ParseTypeChange, GetSourceTypeOptions, InventoryUpdate, GetUpdateIntervalOptions,
LookUpInit, Empty, Wait, GetChoices, UpdateGroup, SourceChange, Find, WatchInventoryWindowResize) {
GetBasePath, SetNodeName, ParseTypeChange, GetSourceTypeOptions, InventoryUpdate, LookUpInit, Empty, Wait,
GetChoices, UpdateGroup, SourceChange, Find, WatchInventoryWindowResize) {
return function (params) {
var parent_scope = params.scope,
@ -747,10 +745,8 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G
scope.$emit('groupLoaded');
})
.error(function (data, status) {
ProcessErrors(scope, data, status, form, {
hdr: 'Error!',
msg: 'Failed to retrieve group: ' + defaultUrl + '. GET status: ' + status
});
ProcessErrors(scope, data, status, form, { hdr: 'Error!',
msg: 'Failed to retrieve group: ' + defaultUrl + '. GET status: ' + status });
});
});

View File

@ -202,6 +202,7 @@ angular.module('InventoryTree', ['Utilities', 'RestServices', 'GroupsHelper', 'P
group_id = params.group_id,
properties = params.properties,
i, p, grp, old_name, stat;
for (i = 0; i < scope.groups.length; i++) {
if (scope.groups[i].group_id === group_id) {
grp = scope.groups[i];