mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 09:27:31 -02:30
Fixed issue with selected users based on user.id rathr than set index. Fixed dataLoad callback not being destroyed after controller routine exits.
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
'use strict';
|
||||
|
||||
function GroupsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
Alert, GroupList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit,
|
||||
ReturnToCaller, ClearScope)
|
||||
Alert, GroupList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit,
|
||||
PaginateInit, ReturnToCaller, ClearScope, ProcessErrors)
|
||||
{
|
||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//scope.
|
||||
@@ -149,8 +149,7 @@ function GroupsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams
|
||||
LookUpInventoryInit({ scope: scope });
|
||||
|
||||
// After the Organization is loaded, retrieve each related set
|
||||
scope.$on('dataLoaded', function() {
|
||||
|
||||
scope.$on('groupLoaded', function() {
|
||||
Rest.setUrl(scope['inventory_url']);
|
||||
Rest.get()
|
||||
.success( function(data, status, headers, config) {
|
||||
@@ -161,11 +160,9 @@ function GroupsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams
|
||||
ProcessErrors(scope, data, status, null,
|
||||
{ hdr: 'Error!', msg: 'Failed to retrieve: ' + scope.orgnization_url + '. GET status: ' + status });
|
||||
});
|
||||
|
||||
for (var set in relatedSets) {
|
||||
scope.search(relatedSets[set].iterator);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Retrieve detail record and prepopulate the form
|
||||
@@ -189,7 +186,7 @@ function GroupsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams
|
||||
RelatedSearchInit({ scope: scope, form: form, relatedSets: relatedSets });
|
||||
RelatedPaginateInit({ scope: scope, relatedSets: relatedSets });
|
||||
scope['inventory_url'] = data.related.inventory;
|
||||
scope.$emit('dataLoaded');
|
||||
scope.$emit('groupLoaded');
|
||||
})
|
||||
.error( function(data, status, headers, config) {
|
||||
ProcessErrors(scope, data, status, form,
|
||||
|
||||
Reference in New Issue
Block a user