You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ve...@apache.org on 2016/07/28 14:38:24 UTC

incubator-ranger git commit: RANGER-1128 : Data Masking label changes for ranger policies

Repository: incubator-ranger
Updated Branches:
  refs/heads/master d8e8890ba -> 4447aa33c


RANGER-1128 : Data Masking label changes for ranger policies

Signed-off-by: Velmurugan Periasamy <ve...@apache.org>


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

Branch: refs/heads/master
Commit: 4447aa33c890273201ab34236981c0788f199560
Parents: d8e8890
Author: Mehul Parikh <me...@freestoneinfotech.com>
Authored: Thu Jul 28 15:15:08 2016 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Thu Jul 28 10:37:43 2016 -0400

----------------------------------------------------------------------
 .../service-defs/ranger-servicedef-hive.json    | 41 ++------------------
 .../main/webapp/scripts/modules/XAOverrides.js  |  3 +-
 .../scripts/modules/globalize/message/en.js     |  3 +-
 .../scripts/views/policies/PermissionList.js    |  4 +-
 security-admin/src/main/webapp/styles/xa.css    | 15 +++++++
 .../templates/policies/PermissionItem.html      |  2 +-
 6 files changed, 25 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4447aa33/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json
----------------------------------------------------------------------
diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json
index 3b7620a..b254d20 100644
--- a/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json
+++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json
@@ -251,7 +251,7 @@
 			{
 				"itemId": 1,
 				"name": "MASK",
-				"label": "Mask",
+				"label": "Redact",
 				"description": "Replace lowercase with 'x', uppercase with 'X', digits with '0'",
 				"transformer": "mask({col})",
 				"dataMaskOptions": {
@@ -281,51 +281,16 @@
 			{
 				"itemId": 5,
 				"name": "MASK_NULL",
-				"label": "NULL",
+				"label": "Nullify",
 				"description": "Replace with NULL"
 			},
 			{
 				"itemId": 6,
 				"name": "MASK_NONE",
-				"label": "No masking",
+				"label": "Unmasked (retain original value)",
 				"description": "No masking"
 			},
 			{
-				"itemId": 7,
-				"name": "MASK_DATE_DAY",
-				"label": "Date: mask day",
-				"description": "Date: mask day",
-				"transformer": "mask({col}, 'x', 'x', 'x', -1, '1', 1, -1, -1)"
-			},
-			{
-				"itemId": 8,
-				"name": "MASK_DATE_MONTH",
-				"label": "Date: mask month",
-				"description": "Date: mask month",
-				"transformer": "mask({col}, 'x', 'x', 'x', -1, '1', -1, 0, -1)"
-			},
-			{
-				"itemId": 9,
-				"name": "MASK_DATE_YEAR",
-				"label": "Date: mask year",
-				"description": "Date: mask year",
-				"transformer": "mask({col}, 'x', 'x', 'x', -1, '1', -1, -1, 0)"
-			},
-			{
-				"itemId": 10,
-				"name": "MASK_DATE_SHOW_DAY",
-				"label": "Date: show only day",
-				"description": "Date: show only day",
-				"transformer": "mask({col}, 'x', 'x', 'x', -1, '1', -1, 0, 0)"
-			},
-			{
-				"itemId": 11,
-				"name": "MASK_DATE_SHOW_MONTH",
-				"label": "Date: show only month",
-				"description": "Date: show only month",
-				"transformer": "mask({col}, 'x', 'x', 'x', -1, '1', 1, -1, 0)"
-			},
-			{
 				"itemId": 12,
 				"name": "MASK_DATE_SHOW_YEAR",
 				"label": "Date: show only year",

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4447aa33/security-admin/src/main/webapp/scripts/modules/XAOverrides.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/modules/XAOverrides.js b/security-admin/src/main/webapp/scripts/modules/XAOverrides.js
index 5604237..a316c30 100644
--- a/security-admin/src/main/webapp/scripts/modules/XAOverrides.js
+++ b/security-admin/src/main/webapp/scripts/modules/XAOverrides.js
@@ -871,7 +871,8 @@
 	                  $label = $('<label>', {'class':this.options.inputclass}).append($('<input>', {
 	                      type : 'radio',
 	                      name : this.options.name,
-	                      value : this.sourceData[i].value
+	                      value : this.sourceData[i].value,
+	                      'class' : 'margin-right-5'
 	                  })).append($('<span>').text(this.sourceData[i].text));
 
 	                  // Add radio buttons to template

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4447aa33/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 de12935..7a41452 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
@@ -233,7 +233,8 @@ define(function(require) {
 				componentPermissions			: 'Component Permissions',
 				selectDataMaskTypes				: 'Select Data Mask Types',
 				accessTypes						: 'Access Types',
-				rowLevelFilter					: 'Row Level Filter'
+				rowLevelFilter					: 'Row Level Filter',
+				selectMaskingOption				: 'Select Masking Option'
 			},
 			btn : {
 				add							: 'Add',

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4447aa33/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
index b48e306..cfde90a 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
@@ -595,7 +595,7 @@ define(function(require) {
 			this.maskTypes =  _.map(maskingTypes, function(m){return {text:m.label, value : m.name };});
 			//create x-editable for permissions
 			this.ui.maskingType.editable({
-			    emptytext : 'Select Masking Type',
+			    emptytext : localization.tt('lbl.selectMaskingOption'),
 				source: this.maskTypes,
 				value : this.maskTypeIds,
 				display: function(value,srcData) {
@@ -728,7 +728,7 @@ define(function(require) {
 					permList.unshift(localization.tt('lbl.rowLevelFilter'));
 					permList.unshift(localization.tt('lbl.accessTypes'));
 				}else if(XAUtil.isMaskingPolicy(this.rangerPolicyType)){
-					permList.unshift(localization.tt('lbl.selectDataMaskTypes'));
+					permList.unshift(localization.tt('lbl.selectMaskingOption'));
 					permList.unshift(localization.tt('lbl.accessTypes'));
 				}else{
 					permList.unshift(localization.tt('lbl.permissions'));

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4447aa33/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 9dbed64..1eb7b6e 100644
--- a/security-admin/src/main/webapp/styles/xa.css
+++ b/security-admin/src/main/webapp/styles/xa.css
@@ -2026,4 +2026,19 @@ td.subgrid-custom-cell{
 }
 .customMask{
 	width: 95px;
+}
+.margin-right-5{
+	margin-right: 5px !important;	
+}
+.VS-search .search_facet {
+	margin-top: 5px;
+}
+.VS-search .VS-cancel-search-box {
+	margin-top: 3px;
+}
+.VS-search .VS-icon-search {
+	margin-top: 3px;
+}
+.VS-search .search_facet_input_container{
+	margin-top: 1px;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4447aa33/security-admin/src/main/webapp/templates/policies/PermissionItem.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/policies/PermissionItem.html b/security-admin/src/main/webapp/templates/policies/PermissionItem.html
index 693e840..745c881 100644
--- a/security-admin/src/main/webapp/templates/policies/PermissionItem.html
+++ b/security-admin/src/main/webapp/templates/policies/PermissionItem.html
@@ -34,7 +34,7 @@
 </td>
 {{#if isMaskingPolicy}}
 <td>	
-	<a href="#" data-js="maskingType" data-type="radiolist" data-title="Select masking type" title="Select masking type" ></a>
+	<a href="#" data-js="maskingType" data-type="radiolist" data-title="Select Masking Option" title="Select Masking Option" ></a>
 	<button type="button" class="btn btn-mini add-masking-type" title="Add" style="display: inline-block;"><i class="icon-plus"></i>
 	</button>
 	<input type="text" data-id="maskTypeCustom" value="{{dataMaskInfo.valueExpr}}" placeholder="enter masked value or expression" style="display:none;" width="40%"/>