ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From me...@apache.org
Subject ranger git commit: RANGER-1985: UI improvement on user sync module
Date Wed, 18 Apr 2018 04:09:01 GMT
Repository: ranger
Updated Branches:
  refs/heads/master b9007bfa6 -> 499650ce0


RANGER-1985: UI improvement on user sync module

Signed-off-by: Mehul Parikh <mehul@apache.org>


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

Branch: refs/heads/master
Commit: 499650ce026f8195c2fd6bb3e8743bcf99ae73a1
Parents: b9007bf
Author: ni3galave <nitin.galave@gmail.com>
Authored: Wed Apr 11 15:09:43 2018 +0530
Committer: Mehul Parikh <mehul@apache.org>
Committed: Wed Apr 18 09:38:41 2018 +0530

----------------------------------------------------------------------
 .../scripts/modules/globalize/message/en.js     |  5 ++--
 .../main/webapp/scripts/utils/XAViewUtils.js    |  6 +++-
 .../webapp/scripts/views/reports/AuditLayout.js | 31 +++++++++++++++++---
 security-admin/src/main/webapp/styles/xa.css    |  3 +-
 4 files changed, 36 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/499650ce/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
----------------------------------------------------------------------
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 66de789..a45bc8b 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
@@ -246,8 +246,6 @@ define(function(require) {
                 activeStatus                    : 'Active Status',
                 selectTagService                : 'Tag Service',
                 syncSource                      : 'Sync Source',
-                noOfUsers                       : 'No. of users',
-                noOfGroups                      : 'No. of groups',
                 unixBackend                     : 'Unix',
                 fileName                        : 'File Name',
                 syncTime                        : 'Sync time',
@@ -263,7 +261,8 @@ define(function(require) {
                 endDate                         : 'End Date',
                                 addValidityPeriod				: 'Add Validity Period',
                                 editValidityPeriod				: 'Edit Validity Period',
-
+                totalUsersSynced                : 'Total number of users synced',
+                totalGroupsSynced               : 'Total number of groups synced',
 
 			},
 			btn : {

http://git-wip-us.apache.org/repos/asf/ranger/blob/499650ce/security-admin/src/main/webapp/scripts/utils/XAViewUtils.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/utils/XAViewUtils.js b/security-admin/src/main/webapp/scripts/utils/XAViewUtils.js
index fabf709..a7abd1e 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAViewUtils.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAViewUtils.js
@@ -103,7 +103,11 @@ define(function(require) {
                     return m.id == e.currentTarget.getAttribute('id');
                 });
                 syncSourceInfo = _.map(syncSourceInfo[0].get('syncSourceInfo'), function(value,
key){
-                    return {'label': 'lbl.'+key, 'value': value };
+                    if(key == 'lastModified' || key == 'syncTime' ){
+                        return {'label': 'lbl.'+key, 'value': Globalize.format(new Date(value),
 "MM/dd/yyyy hh:mm:ss tt") }
+                    }else{
+                        return {'label': 'lbl.'+key, 'value': value };
+                    }
                 });
                 return {'syncSourceInfo' : syncSourceInfo };
             },

http://git-wip-us.apache.org/repos/asf/ranger/blob/499650ce/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
index c80dd4f..cb13908 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
@@ -189,6 +189,16 @@ define(function(require) {
                     <th class="renderable cip" colspan="3">Tag ( Time )</th>\
 			 	</tr>');
 		},
+        modifyUserSyncTableSubcolumns : function(){
+            this.$el.find('[data-id="r_tableList"] table thead').prepend('<tr>\
+                    <th class="renderable ruser"></th>\
+                    <th class="renderable ruser"></th>\
+                    <th class="renderable cip" colspan="2">Number Of New</th>\
+                    <th class="renderable cip" colspan="2">Number Of Modified</th>\
+                    <th class="renderable ruser"></th>\
+                    <th class="renderable ruser"></th>\
+            </tr>');
+        },
 
 		onTabChange : function(e){
 			var that = this, tab;
@@ -280,6 +290,7 @@ define(function(require) {
                      this.ui.visualSearch.show();
                      this.userSyncAuditList = new VXUserList();
                      this.renderUserSyncTable();
+                     this.modifyUserSyncTableSubcolumns();
                      //To use existing collection
                      this.userSyncAuditList.url = 'service/assets/ugsyncAudits';
                      this.userSyncAuditList.modelAttrName = 'vxUgsyncAuditInfoList';
@@ -1566,15 +1577,27 @@ define(function(require) {
                         }
                     }),
                 },
-                noOfUsers : {
+                noOfNewUsers : {
                     cell 	: 'string',
-                    label	: localization.tt("lbl.noOfUsers"),
+                    label	: localization.tt("h.users"),
                     editable:false,
                     sortable:false,
                 },
-                noOfGroups : {
+                noOfNewGroups : {
                     cell 	: 'string',
-                    label	: localization.tt("lbl.noOfGroups"),
+                    label	: localization.tt("h.groups"),
+                    editable:false,
+                    sortable:false,
+                },
+                noOfModifiedUsers : {
+                    cell    : 'string',
+                    label   : localization.tt("h.users"),
+                    editable:false,
+                    sortable:false,
+                },
+                noOfModifiedGroups : {
+                    cell    : 'string',
+                    label   : localization.tt("h.groups"),
                     editable:false,
                     sortable:false,
                 },

http://git-wip-us.apache.org/repos/asf/ranger/blob/499650ce/security-admin/src/main/webapp/styles/xa.css
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/styles/xa.css b/security-admin/src/main/webapp/styles/xa.css
index 3869f8e..da3433f 100644
--- a/security-admin/src/main/webapp/styles/xa.css
+++ b/security-admin/src/main/webapp/styles/xa.css
@@ -1594,7 +1594,8 @@ background-color: #dc6343;
   display: inline-block;
   margin-right: 3px;
 }
-table.table.backgrid thead th.repoName, .policyActive, .policyDownloaded, .lastPolicyUpdateTime,
.tagActive, .tagDownloaded, .lastTagUpdateTime {
+table.table.backgrid thead th.repoName, .policyActive, .policyDownloaded, .lastPolicyUpdateTime,
.tagActive, .tagDownloaded,
+ .lastTagUpdateTime, .noOfNewUsers, .noOfNewGroups, .noOfModifiedUsers, .noOfModifiedGroups
{
  border-top: 1px solid #ddd !important;
 }
 table.table.backgrid thead th.resourceType {


Mime
View raw message