Repository: ranger
Updated Branches:
  refs/heads/ranger-0.7 b84428968 -> 694ff57f1


RANGER-1708 : Remove tag services from service type and service name filters 
under Access Audit.


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

Branch: refs/heads/ranger-0.7
Commit: 694ff57f15ed108bbfe428ea97be960f8937c5df
Parents: b844289
Author: Nitin Galave <nitin.gal...@gmail.com>
Authored: Mon Jul 24 11:17:14 2017 +0530
Committer: Mehul Parikh <me...@apache.org>
Committed: Mon Aug 7 10:37:01 2017 +0530

----------------------------------------------------------------------
 .../webapp/scripts/views/reports/AuditLayout.js   | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/694ff57f/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 40f56dd..68be81e 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
@@ -320,15 +320,25 @@ define(function(require) {
                                                
                                                switch (facet) {
                                                        case 'Service Name':
-                                                               var serviceList 
        = new RangerServiceList();
+                                                               var serviceList 
        = new RangerServiceList() , serviceNameVal = [];
                                                                
serviceList.setPageSize(100);
                                                                
serviceList.fetch().done(function(){
-                                                                       
callback(serviceList.map(function(model){return model.get('name');}));
+                                                               
serviceList.each(function(m){
+                                                                       
if(m.get('type') !== XAEnums.ServiceType.SERVICE_TAG.label){
+                                                                               
serviceNameVal.push(m.get('name'));
+                                                                       };
+                                                               });
+                                                               
callback(serviceNameVal);
                                                                });
                                                                break;
                                                        case 'Service Type':
-                                                               var serviceList 
=  that.serviceDefList.map(function(serviceDef){ return {'label' : 
serviceDef.get('name').toUpperCase(), 'value' : 
serviceDef.get('name').toUpperCase()}; })
-                                                               
callback(serviceList);
+                                                               var serviveDefs 
= [];
+                                                               
that.serviceDefList.each(function(m){
+                                                                       
if(m.get('name').toUpperCase() != 
(XAEnums.ServiceType.SERVICE_TAG.label).toUpperCase()){
+                                                                               
serviveDefs.push({ 'label' : m.get('name').toUpperCase(), 'value' : 
m.get('name').toUpperCase() });
+                                                                       }
+                                                               });
+                                                               
callback(serviveDefs);
                                                                break;
                                                        case 'Result':
                                                
callback(XAUtils.hackForVSLabelValuePairs(XAEnums.AccessResult));

Reply via email to