Преглед изворни кода

AMBARI-15688. Ambari Admin: 'users/groups' message on Roles page is not correct (alexantonenko)

Alex Antonenko пре 9 година
родитељ
комит
af19b7d0f1

+ 3 - 2
ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js

@@ -22,7 +22,8 @@ angular.module('ambariAdminConsole')
 function($scope, $location, Cluster, $modal, $rootScope, $routeParams, PermissionSaver, Alert, $translate) {
   var $t = $translate.instant;
   $scope.constants = {
-    usersGroups: $t('common.usersGroups').toLowerCase()
+    users: $t('common.users').toLowerCase(),
+    groups: $t('common.groups').toLowerCase()
   };
   $scope.users = [];
   $scope.usersPerPage = 10;
@@ -181,7 +182,7 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio
     $scope.currentPage = 1;
     $scope.loadUsers();
   };
-  $scope.currentRoleFilter = { label:$('common.all'), value: '' };
+  $scope.currentRoleFilter = { label:$t('common.all'), value: '' };
 
 
   $scope.typeFilterOptions = [

+ 2 - 2
ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html

@@ -85,11 +85,11 @@
     </tbody>
   </table>
   <div class="alert alert-info col-sm-12" ng-show="!users.length">
-    {{'common.alerts.nothingToDisplay' | translate: '{term: constants.usersGroups}'}}
+    {{'common.alerts.nothingToDisplay' | translate: '{term: (isUserActive ? constants.users : constants.groups)}'}}
   </div>
   <div class="col-sm-12 table-bar">
     <div class="pull-left filtered-info">
-      <span>{{'common.filterInfo' | translate: '{showed: tableInfo.showed, total: tableInfo.total, term: constants.usersGroups}'}}</span>
+      <span>{{'common.filterInfo' | translate: '{showed: tableInfo.showed, total: tableInfo.total, term: (isUserActive ? constants.users : constants.groups)}'}}</span>
       <span ng-show="isNotEmptyFilter">- <a href ng-click="clearFilters()">{{'common.controls.clearFilters' | translate}}</a></span>
     </div>
     <div class="pull-right left-margin">

+ 1 - 1
ambari-admin/src/main/resources/ui/admin-web/app/views/modals/RoleDetailsModal.html

@@ -34,5 +34,5 @@
     </table>
 </div>
 <div class="modal-footer text-center">
-    <button class="btn btn-primary" ng-click="ok()">Close</button>
+    <button class="btn btn-primary" ng-click="ok()">{{'common.controls.close' | translate}}</button>
 </div>