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 2021/06/28 13:14:50 UTC
[ranger] branch ranger-2.2 updated: RANGER-3323 : Ranger Hive Table
lookup is not working.
This is an automated email from the ASF dual-hosted git repository.
ni3galave pushed a commit to branch ranger-2.2
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.2 by this push:
new 9651c02 RANGER-3323 : Ranger Hive Table lookup is not working.
9651c02 is described below
commit 9651c029e95bf09bb7054308fee1abb1a236d49f
Author: Nitin Galave <ni...@apache.org>
AuthorDate: Mon Jun 28 11:00:27 2021 +0530
RANGER-3323 : Ranger Hive Table lookup is not working.
---
.../main/webapp/scripts/views/policies/RangerPolicyForm.js | 11 +++++++++--
.../webapp/scripts/views/security_zone/ZoneResourceForm.js | 12 ++++++++++--
.../scripts/views/service/ServiceAuditFilterResources.js | 12 ++++++++++--
3 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
index 4f08c75..3ea1db3 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
@@ -852,7 +852,7 @@ define(function(require){
}
},
getDataParams : function(term, options) {
- var resources = {},resourceName = options.type;
+ var resources = {},resourceName = options.type, dataResources = {};
var isParent = true, name = options.type, val = null,isCurrentSameLevelField = true;
while(isParent){
var currentResource = _.findWhere(this.getResources(), {'name': name });
@@ -880,10 +880,17 @@ define(function(require){
}
isCurrentSameLevelField = false;
}
+ if(resources && !_.isEmpty(resources)) {
+ _.each(resources, function(val, key) {
+ dataResources[key] = _.map(val, function(obj){
+ return obj.text
+ })
+ })
+ }
var context ={
'userInput' : term,
'resourceName' : resourceName,
- 'resources' : resources
+ 'resources' : dataResources
};
return JSON.stringify(context);
},
diff --git a/security-admin/src/main/webapp/scripts/views/security_zone/ZoneResourceForm.js b/security-admin/src/main/webapp/scripts/views/security_zone/ZoneResourceForm.js
index 1725670..700d4f4 100644
--- a/security-admin/src/main/webapp/scripts/views/security_zone/ZoneResourceForm.js
+++ b/security-admin/src/main/webapp/scripts/views/security_zone/ZoneResourceForm.js
@@ -436,7 +436,8 @@ define(function(require) {
getDataParams: function(term, options) {
var resources = {},
- resourceName = options.type;
+ resourceName = options.type,
+ dataResources = {};
var isParent = true,
name = options.type,
val = null,
@@ -469,10 +470,17 @@ define(function(require) {
}
isCurrentSameLevelField = false;
}
+ if(resources && !_.isEmpty(resources)) {
+ _.each(resources, function(val, key) {
+ dataResources[key] = _.map(val, function(obj){
+ return obj.text
+ })
+ })
+ }
var context = {
'userInput': term,
'resourceName': resourceName,
- 'resources': resources
+ 'resources': dataResources
};
return JSON.stringify(context);
},
diff --git a/security-admin/src/main/webapp/scripts/views/service/ServiceAuditFilterResources.js b/security-admin/src/main/webapp/scripts/views/service/ServiceAuditFilterResources.js
index 318cdcb..6a489b5 100644
--- a/security-admin/src/main/webapp/scripts/views/service/ServiceAuditFilterResources.js
+++ b/security-admin/src/main/webapp/scripts/views/service/ServiceAuditFilterResources.js
@@ -422,7 +422,8 @@ define(function(require) {
getDataParams: function(term, options) {
var resources = {},
- resourceName = options.type;
+ resourceName = options.type,
+ dataResources = {};
var isParent = true,
name = options.type,
val = null,
@@ -455,10 +456,17 @@ define(function(require) {
}
isCurrentSameLevelField = false;
}
+ if(resources && !_.isEmpty(resources)) {
+ _.each(resources, function(val, key) {
+ dataResources[key] = _.map(val, function(obj){
+ return obj.text
+ })
+ })
+ }
var context = {
'userInput': term,
'resourceName': resourceName,
- 'resources': resources
+ 'resources': dataResources
};
return JSON.stringify(context);
},