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

Fixes missing Wait("stop") calls, resolves audit items in #3816 (#4218)

This commit is contained in:
Leigh Johnson 2016-12-01 20:32:06 -05:00 committed by GitHub
parent 8911766eea
commit 4d1b10f0d1
7 changed files with 18 additions and 14 deletions

View File

@ -52,13 +52,12 @@ export function CredentialsList($scope, $rootScope, $location, $log,
Rest.setUrl(url); Rest.setUrl(url);
Rest.destroy() Rest.destroy()
.success(function() { .success(function() {
if (parseInt($state.params.credential_id) === id) { if (parseInt($state.params.credential_id) === id) {
$state.go("^", null, { reload: true }); $state.go("^", null, { reload: true });
} else { } else {
// @issue: OLD SEARCH $state.go('.', null, {reload: true});
// $scope.search(list.iterator);
} }
Wait('stop');
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors($scope, data, status, null, { ProcessErrors($scope, data, status, null, {
@ -302,6 +301,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
Rest.get() Rest.get()
.success(function(data) { .success(function(data) {
$scope.canShareCredential = (data.count) ? true : false; $scope.canShareCredential = (data.count) ? true : false;
Wait('stop');
}).error(function(data, status) { }).error(function(data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status }); ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
}); });
@ -462,6 +462,7 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
$scope.credential_obj = data; $scope.credential_obj = data;
$scope.$emit('credentialLoaded'); $scope.$emit('credentialLoaded');
Wait('stop');
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors($scope, data, status, form, { ProcessErrors($scope, data, status, form, {

View File

@ -551,6 +551,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
$scope.project_obj = data; $scope.project_obj = data;
$scope.name = data.name; $scope.name = data.name;
$scope.$emit('projectLoaded'); $scope.$emit('projectLoaded');
Wait('stop');
}) })
.error(function (data, status) { .error(function (data, status) {
ProcessErrors($scope, data, status, form, { hdr: i18n._('Error!'), ProcessErrors($scope, data, status, form, { hdr: i18n._('Error!'),

View File

@ -173,6 +173,7 @@ export function TeamsEdit($scope, $rootScope, $stateParams,
$scope.organization_name = data.summary_fields.organization.name; $scope.organization_name = data.summary_fields.organization.name;
$scope.team_obj = data; $scope.team_obj = data;
Wait('stop');
}); });
$scope.$watch('team_obj.summary_fields.user_capabilities.edit', function(val) { $scope.$watch('team_obj.summary_fields.user_capabilities.edit', function(val) {

View File

@ -125,9 +125,9 @@ export default
}; };
}]) }])
.factory('DeleteJob', ['Find', 'GetBasePath', 'Rest', 'Wait', .factory('DeleteJob', ['$state', 'Find', 'GetBasePath', 'Rest', 'Wait',
'ProcessErrors', 'Prompt', 'Alert', '$filter', 'ProcessErrors', 'Prompt', 'Alert', '$filter',
function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert, function($state, Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert,
$filter){ $filter){
return function(params) { return function(params) {
var scope = params.scope, var scope = params.scope,
@ -176,8 +176,8 @@ export default
scope.$emit(callback, action_label); scope.$emit(callback, action_label);
} }
else { else {
// @issue: OLD SEARCH $state.reload();
// scope.search(scope.iterator); Wait('stop');
} }
}) })
.error(function(obj, status) { .error(function(obj, status) {
@ -198,8 +198,8 @@ export default
scope.$emit(callback, action_label); scope.$emit(callback, action_label);
} }
else { else {
// @issue: OLD SEARCH $state.reload();
// scope.search(scope.iterator); Wait('stop');
} }
}) })
.error(function (obj, status) { .error(function (obj, status) {

View File

@ -274,8 +274,8 @@ function InventoriesList($scope, $rootScope, $location, $log,
if (parseInt($state.params.inventory_id) === id) { if (parseInt($state.params.inventory_id) === id) {
$state.go("^", null, {reload: true}); $state.go("^", null, {reload: true});
} else { } else {
// @issue: OLD SEARCH $state.go('.', null, {reload: true});
// $scope.search(list.iterator); Wait('stop');
} }
}) })
.error(function (data, status) { .error(function (data, status) {

View File

@ -162,11 +162,11 @@
Rest.destroy() Rest.destroy()
.success(function() { .success(function() {
if (parseInt($state.params.notification_template_id) === id) { if (parseInt($state.params.notification_template_id) === id) {
$state.go("^", null, { reload: true }); $state.go("^", null, { reload: true });
} else { } else {
// @issue: OLD SEARCH $state.go('.', null, {reload: true});
// $scope.search(list.iterator);
} }
Wait('stop');
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors($scope, data, status, null, { ProcessErrors($scope, data, status, null, {

View File

@ -47,6 +47,7 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
} }
$scope.organization_obj = data; $scope.organization_obj = data;
$scope.$emit('organizationLoaded'); $scope.$emit('organizationLoaded');
Wait('stop');
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors($scope, data, status, form, { ProcessErrors($scope, data, status, form, {