Sfoglia il codice sorgente

AMBARI-16795. Ambari Admin: UX cleanup + consistency (akovalenko)

Aleksandr Kovalenko 9 anni fa
parent
commit
0121f9ecec

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

@@ -97,7 +97,7 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio
     } else {
       return angular.copy($scope.NONE_ROLE);
     }
-  }
+  };
 
   $scope.loadRoles = function() {
     Cluster.getPermissions().then(function(data) {

+ 4 - 4
ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js

@@ -206,7 +206,7 @@ angular.module('ambariAdminConsole')
       'shortUrl':'Short URL',
       'instanceDescription': 'Instance Description',
       'clusterConfiguration': 'Cluster Configuration',
-      'localCluster': 'Local Ambari Managed Cluster',
+      'localCluster': 'Local Cluster',
       'remoteCluster': 'Remote Cluster',
       'registerRemoteCluster' : 'Register Remote Cluster',
       'clusterName': 'Cluster Name',
@@ -231,7 +231,7 @@ angular.module('ambariAdminConsole')
         'allclusteruser': 'Cluster User',
         'allserviceadministrator': 'Service Administrator',
         'allserviceoperator': 'Service Operator',
-        'infoMessage': 'Grant <strong>Use</strong> permission for the following <strong>{{cluster}}</strong>',
+        'infoMessage': 'Grant <strong>Use</strong> permission for the following <strong>{{cluster}}</strong> Roles:',
         'nonLocalClusterMessage': 'The ability to inherit view <strong>Use</strong> permission based on Cluster Roles is only available when using a Local Cluster configuration.'
       },
 
@@ -347,7 +347,7 @@ angular.module('ambariAdminConsole')
         'clusterOperator': 'Cluster Operator',
         'serviceAdministrator': 'Service Administrator',
         'serviceOperator': 'Service Operator',
-        'ambariAdmin': 'Administrator',
+        'ambariAdmin': 'Ambari Administrator',
         'viewUser': 'View User',
         'none': 'None',
         'oneRolePerUser': 'Only 1 role allowed per user'
@@ -511,4 +511,4 @@ angular.module('ambariAdminConsole')
   });
 
   $translateProvider.preferredLanguage('en');
-}]);
+}]);

+ 2 - 2
ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js

@@ -194,9 +194,9 @@ angular.module('ambariAdminConsole')
   View.clusterInheritedPermissionKeys = [
     "ALL.CLUSTER.ADMINISTRATOR",
     "ALL.CLUSTER.OPERATOR",
-    "ALL.CLUSTER.USER",
     "ALL.SERVICE.OPERATOR",
-    "ALL.SERVICE.ADMINISTRATOR"
+    "ALL.SERVICE.ADMINISTRATOR",
+    "ALL.CLUSTER.USER"
   ];
 
   View.getInstance = function(viewName, version, instanceName) {

+ 6 - 8
ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css

@@ -1584,10 +1584,6 @@ thead.view-permission-header > tr > th {
   width: 40%;
 }
 
-.role-actions {
-  width: 400px;
-}
-
 .green-icon {
   color: #5ab400;
 }
@@ -1685,11 +1681,13 @@ legend {
 }
 
 .cluster-inherited-permission {
-    border-bottom: 2px solid #ddd;
-    padding-bottom: 10px;
-    margin-top: 5px;
+  border-bottom: 2px solid #ddd;
+  padding-bottom: 10px;
+  padding-left: 8px;
+  margin-top: 5px;
+  margin-bottom: 5px;
 }
 
 .glyphicon-question-sign {
   color: #0572ff;
-}
+}

+ 4 - 5
ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html

@@ -274,13 +274,12 @@
       </tr>
       </tbody>
     </table>
+    <div class="cluster-inherited-permission">
+      <strong>{{'views.clusterPermissions.label' | translate}}</strong>
+    </div>
     <div ng-show="!isPermissionsEmpty && (data.clusterType == 'LOCAL_AMBARI') && editConfigurationDisabled">
-      <div class="col-sm-12 cluster-inherited-permission">
-        <strong>{{'views.clusterPermissions.label' | translate}}</strong>
-      </div>
       <div class="col-sm-12">
         <span translate="views.clusterPermissions.infoMessage" translate-values="{cluster: cluster}"></span>
-        <div>{{'common.roles' | translate}}:</div>
       </div>
       <div class="col-sm-offset-2 col-sm-10">
         <div class="checkbox col-sm-12" ng-repeat="key in clusterInheritedPermissionKeys">
@@ -300,4 +299,4 @@
       <div class="alert alert-info">{{'views.alerts.notDefined' | translate: '{term: constants.perms}'}}</div>
     </div>
   </div>
-</div>
+</div>

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

@@ -50,7 +50,7 @@
           </button>
         </div>
       </th>
-      <th colspan="2">
+      <th>
         <label for="">{{'clusters.role' | translate}}</label>&nbsp;
         <i class="glyphicon glyphicon-question-sign green-icon cursor-pointer" ng-click="showHelpPage()"></i>
         <select class="form-control statusfilter"
@@ -71,16 +71,14 @@
         <select class="role-select" ng-show="user.editable" ng-model="user.permission_name"
                 ng-options="role.permission_name as role.permission_label for role in roleValueOptions">
         </select>
-      </td>
-      <td class="role-actions">
-        <div class="pull-left" ng-show="user.permission_name != user.original_perm">
+        <span ng-show="user.permission_name != user.original_perm">
           <button class="btn btn-default btn-xs cancel" ng-click="cancel(user)">
             <span class="glyphicon glyphicon-remove cancel"></span>
           </button>
           <button class="btn btn-primary btn-xs" ng-click="save(user)">
             <span class="glyphicon glyphicon-ok"></span>
           </button>
-        </div>
+        </span>
       </td>
     </tr>
     </tbody>