ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-16688: Ambari users page is not showing type for users (rzang)
Date Mon, 16 May 2016 21:41:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c4cd7856b -> ac151fb53


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/ac151fb5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac151fb5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac151fb5

Branch: refs/heads/branch-2.4
Commit: ac151fb535b87646f295bea3a2d5a0eef0a78e11
Parents: c4cd785
Author: Richard Zang <rzang@apache.org>
Authored: Mon May 16 14:36:12 2016 -0700
Committer: Richard Zang <rzang@apache.org>
Committed: Mon May 16 14:39:52 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/ac151fb5/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;


Mime
View raw message