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

Merge pull request #80 from ansible/teams_error

fix of the teams list console errors
This commit is contained in:
jlmitch5 2015-02-18 16:28:56 -05:00
commit c9d527ee77

View File

@ -202,19 +202,25 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
}
$scope.teamLoadedRemove = $scope.$on('teamLoaded', function () {
CheckAccess({ scope: $scope });
Rest.setUrl($scope.organization_url);
Rest.get()
.success(function (data) {
$scope.organization_name = data.name;
master.organization_name = data.name;
Wait('stop');
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to retrieve organization: ' +
$scope.orgnization_url + '. GET status: ' + status });
});
for (var set in relatedSets) {
$scope.search(relatedSets[set].iterator);
if ($scope.organization_url) {
Rest.setUrl($scope.organization_url);
Rest.get()
.success(function (data) {
$scope.organization_name = data.name;
master.organization_name = data.name;
Wait('stop');
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to retrieve organization: ' +
$scope.orgnization_url + '. GET status: ' + status });
});
for (var set in relatedSets) {
$scope.search(relatedSets[set].iterator);
}
} else {
$scope.organization_name = "";
master.organization_name = "";
Wait('stop');
}
});
@ -387,4 +393,4 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
TeamsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'TeamForm',
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit',
'ReturnToCaller', 'ClearScope', 'LookUpInit', 'Prompt', 'GetBasePath', 'CheckAccess', 'OrganizationList', 'Wait', 'Stream'
];
];