Commit 8e2d722a authored by fabio martelli's avatar fabio martelli
Browse files

improve enduser javascript console logging

parent 05c37e06
......@@ -38,13 +38,11 @@ angular.module("login").controller("LoginController", ['$scope', '$http', '$loca
$scope.login = function (credentials) {
AuthService.login($scope.credentials).then(function (user) {
console.info("Login success for: ", user);
// reset error message
$scope.credentials.errorMessage = '';
// got to update page
$location.path("/self/update");
}, function (response) {
console.info("Login failed for: ", response);
var errorMessage;
// parse error response
if (response !== undefined) {
......@@ -59,7 +57,7 @@ angular.module("login").controller("LoginController", ['$scope', '$http', '$loca
AuthService.logout().then(function (response) {
console.info("Logout successfully");
}, function (response) {
console.info("Logout failed: ", response);
console.info("Logout failed");
});
};
$scope.islogged = function () {
......
......@@ -274,7 +274,6 @@ angular.module("self").controller("UserController", ['$scope', '$rootScope', '$l
}
$rootScope.viewGroups = "viewgroups";
console.info("viewgroups ");
// initialize groups and choreographies
var realm = $scope.user.realm || "/";
......@@ -405,7 +404,6 @@ angular.module("self").controller("UserController", ['$scope', '$rootScope', '$l
var wrappedUser = UserUtil.getWrappedUser(user);
if ($scope.createMode) {
UserSelfService.create(wrappedUser, $scope.captchaInput.value).then(function (response) {
console.info("User " + $scope.user.username + " SUCCESSFULLY_CREATED");
$rootScope.currentUser = $scope.user.username;
$rootScope.currentOp = "SUCCESSFULLY_CREATED";
$state.go('success');
......@@ -423,8 +421,6 @@ angular.module("self").controller("UserController", ['$scope', '$rootScope', '$l
UserSelfService.update(wrappedUser, $scope.captchaInput.value).then(function (response) {
console.debug("Updated user: ", response);
AuthService.logout().then(function (response) {
console.info("LOGOUT SUCCESS: ", response);
console.info("User " + $scope.user.username + " SUCCESSFULLY_UPDATED");
$rootScope.currentUser = $scope.user.username;
$rootScope.currentOp = "SUCCESSFULLY_UPDATED";
$state.go('success');
......@@ -432,7 +428,7 @@ angular.module("self").controller("UserController", ['$scope', '$rootScope', '$l
console.error("LOGOUT FAILED");
});
}, function (response) {
console.info("Error during user update: ", response);
console.info("Error during user update");
var errorMessage;
// parse error response
if (response !== undefined) {
......
......@@ -40,7 +40,6 @@ angular.module('login')
headers: {'captcha': captcha}
})
.then(function (response) {
console.debug("response save: ", response);
var username = response;
return username;
}, function (response) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment