From d44ab972325f1f39eedbec588795c220e1d7c2ac Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Thu, 3 Jul 2014 03:10:51 -0400 Subject: [PATCH] Fixed poor error message on login failure. Fixed JS errors. --- awx/ui/static/js/controllers/Authentication.js | 8 +++++--- awx/ui/static/js/controllers/Inventories.js | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index afa0c7be2e..33af8d56ba 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -140,7 +140,7 @@ function Authenticate($cookieStore, $compile, $window, $scope, $rootScope, $loca $rootScope.sessionTimer = Timer.init(); scope.$emit('AuthorizationGetUser'); }) - .error(function (data, status) { + .error(function (data) { var hdr, msg, key; Wait('stop'); 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) { hdr = 'Error'; msg = data.non_field_errors[0]; - } else { + } + else { 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(); Alert(hdr, msg, 'alert-danger', setLoginFocus); diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index 5777cb4ca6..4b44585f8f 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -169,7 +169,6 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com } $scope.removeRefreshInventories = $scope.$on('RefreshInventories', function () { // Reflect changes after inventory properties edit completes - console.log('here!!'); $scope.search(list.iterator); });