You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2016/05/16 21:39:15 UTC

ambari git commit: AMBARI-16688: Ambari users page is not showing type for users (rzang)

Repository: ambari
Updated Branches:
  refs/heads/trunk 93a045df4 -> b2ece8c2b


AMBARI-16688: Ambari users page is not showing type for users (rzang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b2ece8c2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b2ece8c2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b2ece8c2

Branch: refs/heads/trunk
Commit: b2ece8c2bee477d0aab81ff35ce2e6032a639ef8
Parents: 93a045d
Author: Richard Zang <rz...@apache.org>
Authored: Mon May 16 14:36:12 2016 -0700
Committer: Richard Zang <rz...@apache.org>
Committed: Mon May 16 14:36:24 2016 -0700

----------------------------------------------------------------------
 .../main/resources/ui/admin-web/app/scripts/services/User.js   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2ece8c2/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
index c6765d0..ac50653 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/User.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-  .factory('User', ['Restangular', '$http', 'Settings', 'UserConstants', function(Restangular, $http, Settings, UserConstants) {
+  .factory('User', ['Restangular', '$http', 'Settings', 'UserConstants', '$translate', function(Restangular, $http, Settings, UserConstants, $translate) {
   Restangular.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
     var extractedData;
     if(operation === 'getList'){
@@ -30,7 +30,7 @@ angular.module('ambariAdminConsole')
 
     return extractedData;
   });
-
+  var $t = $translate.instant;
   var Users = Restangular.all('users');
 
   return {
@@ -95,7 +95,7 @@ angular.module('ambariAdminConsole')
      */
     makeUser: function(user) {
       user.Users.encoded_name = encodeURIComponent(user.Users.user_name);
-      user.Users.userTypeName = UserConstants.TYPES[user.Users.user_type].NAME;
+      user.Users.userTypeName = $t(UserConstants.TYPES[user.Users.user_type].LABEL_KEY);
       user.Users.ldap_user = user.Users.user_type === UserConstants.TYPES.LDAP.VALUE;
 
       return user;