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

Fixed poor error message on login failure. Fixed JS errors.

This commit is contained in:
Chris Houseknecht 2014-07-03 03:10:51 -04:00
parent 92bba3a87c
commit d44ab97232
2 changed files with 5 additions and 4 deletions

View File

@ -140,7 +140,7 @@ function Authenticate($cookieStore, $compile, $window, $scope, $rootScope, $loca
$rootScope.sessionTimer = Timer.init(); $rootScope.sessionTimer = Timer.init();
scope.$emit('AuthorizationGetUser'); scope.$emit('AuthorizationGetUser');
}) })
.error(function (data, status) { .error(function (data) {
var hdr, msg, key; var hdr, msg, key;
Wait('stop'); Wait('stop');
if (data.non_field_errors && data.non_field_errors.length === 0) { if (data.non_field_errors && data.non_field_errors.length === 0) {
@ -152,9 +152,11 @@ function Authenticate($cookieStore, $compile, $window, $scope, $rootScope, $loca
if (data.non_field_errors && data.non_field_errors.length > 0) { if (data.non_field_errors && data.non_field_errors.length > 0) {
hdr = 'Error'; hdr = 'Error';
msg = data.non_field_errors[0]; msg = data.non_field_errors[0];
} else { }
else {
hdr = 'Error'; hdr = 'Error';
msg = 'The login attempt failed with a status of: ' + status; msg = 'The login attempt failed. The Tower server is not responding. Check that the Tower server processes are running' +
' and accessible.';
} }
scope.reset(); scope.reset();
Alert(hdr, msg, 'alert-danger', setLoginFocus); Alert(hdr, msg, 'alert-danger', setLoginFocus);

View File

@ -169,7 +169,6 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com
} }
$scope.removeRefreshInventories = $scope.$on('RefreshInventories', function () { $scope.removeRefreshInventories = $scope.$on('RefreshInventories', function () {
// Reflect changes after inventory properties edit completes // Reflect changes after inventory properties edit completes
console.log('here!!');
$scope.search(list.iterator); $scope.search(list.iterator);
}); });