You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ni...@apache.org on 2022/03/16 13:38:55 UTC

[ranger] 01/02: RANGER-3660 : [Ranger Admin UI] Improvements in tooltip hints for better user experience

This is an automated email from the ASF dual-hosted git repository.

ni3galave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit 9c9151e9e6b00ff5c7fe0fadf13d62b932ad2eac
Author: Dhaval.Rajpara <dh...@gmail.com>
AuthorDate: Wed Mar 16 17:26:08 2022 +0530

    RANGER-3660 : [Ranger Admin UI] Improvements in tooltip hints for better user experience
    
    Signed-off-by: Nitin Galave <ni...@apache.org>
---
 .../src/main/webapp/scripts/modules/globalize/message/en.js       | 2 +-
 .../webapp/scripts/views/policies/NRangerPolicyTableLayout.js     | 7 +++----
 .../main/webapp/scripts/views/policies/RangerPolicyTableLayout.js | 8 +++-----
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
index 1d87d16..be779f5 100644
--- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
+++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
@@ -379,7 +379,7 @@ define(function(require) {
                 type                        :'Policy for all type.',
                 udf                         :'Hive udf.',
                 pluginStatus                :'Plugin Status',
-                clusterName                 :'Name of ambari cluster',
+                clusterName                 :'Name of cluster',
                 zoneName                    :"Name of Zone",
                 policyVersion               :'Policy Version',
                 url        					:'Hive url.',
diff --git a/security-admin/src/main/webapp/scripts/views/policies/NRangerPolicyTableLayout.js b/security-admin/src/main/webapp/scripts/views/policies/NRangerPolicyTableLayout.js
index 2e32ef7..d7ff26d 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/NRangerPolicyTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/NRangerPolicyTableLayout.js
@@ -524,7 +524,8 @@ define(function(require) {
                 var resourceSearchOpt = _.map(resources, function(resource) {
                     return {
                         'name': resource.name,
-                        'label': resource.label
+                        'label': resource.label,
+                        'description':resource.description
                     };
                 });
                 var PolicyStatusValue = _.map(XAEnums.ActiveStatus, function(status) {
@@ -571,8 +572,6 @@ define(function(require) {
                     info :localization.tt('h.roleMsg'),
                     urlLabel : 'roleName'
                 }];
-                // {text : 'Start Date',label :'startDate'},{text : 'End Date',label :'endDate'},
-                //  {text : 'Today',label :'today'}];
                 var info = {
                     collection: localization.tt('h.collection'),
                     column: localization.tt('lbl.columnName'),
@@ -604,7 +603,7 @@ define(function(require) {
                     return {
                         'text': opt.label,
                         'label': 'resource:' + opt.name,
-                        'info': info[opt.name],
+                        'info': !_.isUndefined(info[opt.name]) ? info[opt.name] : opt.description,
                         'urlLabel': XAUtil.stringToCamelCase(opt.label.toLowerCase()),
                     };
                 });
diff --git a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
index 35952d4..af7c70a 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
@@ -476,7 +476,7 @@ define(function(require){
                                 resources = this.rangerServiceDefModel.get('rowFilterDef')['resources'];
                         }
                         var resourceSearchOpt = _.map(resources, function(resource){
-                                        return { 'name' : resource.name, 'label' : resource.label };
+                                        return { 'name' : resource.name, 'label' : resource.label, 'description':resource.description };
                         });
 			var PolicyStatusValue = _.map(XAEnums.ActiveStatus, function(status) { return { 'label': status.label, 'value': Boolean(status.value)}; });
 	
@@ -489,9 +489,7 @@ define(function(require){
                                                {text : "Role Name",   label :"role" ,  info :localization.tt('h.roleMsg'), urlLabel : 'roleName'},
                                                {text : "Policy Label",   label :"policyLabelsPartial" ,  info :localization.tt('h.policyLabelsinfo'), urlLabel : 'policyLabel'},
                                                ];
-			                     // {text : 'Start Date',label :'startDate'},{text : 'End Date',label :'endDate'},
-				                 //  {text : 'Today',label :'today'}];
-                        var info = { collection : localization.tt('h.collection')    , column   :localization.tt('lbl.columnName'),
+			            var info = { collection : localization.tt('h.collection')    , column   :localization.tt('lbl.columnName'),
                                          'column-family':localization.tt('msg.columnfamily') , database :localization.tt('h.database'),
                                           entity        :localization.tt('h.entity') , keyname  :localization.tt('lbl.keyName'),
                                           path:localization.tt('h.path'), queue: localization.tt('h.queue'), service:localization.tt('h.serviceNameMsg'),
@@ -507,7 +505,7 @@ define(function(require){
                                         return {
                                                 'text': opt.label,
                                                 'label': 'resource:'+ opt.name,
-                                                'info' : info[opt.name],
+                                                'info' : !_.isUndefined(info[opt.name]) ? info[opt.name] : opt.description,
                                                 'urlLabel' : XAUtil.stringToCamelCase(opt.label.toLowerCase()),
                                         };
 			});