mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 00:57:48 -02:30
AC-1308 spinner lingers after 403 error
Happening on response to Delete prompt. Removed modal hide listener when starting spinner. Not sure why I thought that was needed. Instead, just close the dialog and start the spinner. If an error occurs, ProcessErrors always stops the spinner. Issue was caused by a race condition. ProcessErrors would sometimes fire tht stop before the event listener fired a start.
This commit is contained in:
@@ -102,10 +102,8 @@ function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest
|
||||
|
||||
$scope.deleteCredential = function (id, name) {
|
||||
var action = function () {
|
||||
$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
$('#prompt-modal').modal('hide');
|
||||
Wait('start');
|
||||
var url = defaultUrl + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
@@ -316,9 +316,7 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com
|
||||
|
||||
var action = function () {
|
||||
var url = defaultUrl + id + '/';
|
||||
$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
Wait('start');
|
||||
$('#prompt-modal').modal('hide');
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
@@ -71,10 +71,8 @@ function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Res
|
||||
|
||||
$scope.deleteJobTemplate = function (id, name) {
|
||||
var action = function () {
|
||||
$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
$('#prompt-modal').modal('hide');
|
||||
Wait('start');
|
||||
var url = defaultUrl + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
@@ -69,10 +69,8 @@ function OrganizationsList($routeParams, $scope, $rootScope, $location, $log, Re
|
||||
$scope.deleteOrganization = function (id, name) {
|
||||
|
||||
var action = function () {
|
||||
$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
$('#prompt-modal').modal('hide');
|
||||
Wait('start');
|
||||
var url = defaultUrl + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
@@ -67,10 +67,8 @@ function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest
|
||||
|
||||
$scope.deletePermission = function (id, name) {
|
||||
var action = function () {
|
||||
$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
$('#prompt-modal').modal('hide');
|
||||
Wait('start');
|
||||
var url = GetBasePath('base') + 'permissions/' + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
@@ -233,10 +233,8 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
|
||||
$scope.deleteProject = function (id, name) {
|
||||
var action = function () {
|
||||
$('#prompt-modal').on('hiden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
$('#prompt-modal').modal('hide');
|
||||
Wait('start');
|
||||
var url = defaultUrl + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
@@ -70,10 +70,11 @@ function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Aler
|
||||
$scope.deleteUser = function (id, name) {
|
||||
|
||||
var action = function () {
|
||||
$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
Wait('start');
|
||||
});
|
||||
//$('#prompt-modal').on('hidden.bs.modal', function () {
|
||||
// Wait('start');
|
||||
//});
|
||||
$('#prompt-modal').modal('hide');
|
||||
Wait('start');
|
||||
var url = defaultUrl + id + '/';
|
||||
Rest.setUrl(url);
|
||||
Rest.destroy()
|
||||
|
||||
Reference in New Issue
Block a user