You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by me...@apache.org on 2020/10/05 20:08:39 UTC

[ranger] 02/03: RANGER-3011 : Code improvement for Audit Access Log Detail popup.

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

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

commit 370cb670139a059ac53e6f0b1f18d7ca625650d7
Author: Nitin Galave <ni...@apache.org>
AuthorDate: Thu Sep 24 17:54:09 2020 +0530

    RANGER-3011 : Code improvement for Audit Access Log Detail popup.
    
    Signed-off-by: Mehul Parikh <me...@apache.org>
---
 .../main/webapp/scripts/views/reports/AuditAccessLogDetailView.js    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js b/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js
index f70103e..8b5181b 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js
@@ -37,11 +37,12 @@ define(function(require) {
             template: AuditAccessLogDetailTmpl,
 
             templateHelpers: function() {
-                var that = this;
+                var that = this, result;
+                result = _.filter(XAEnums.AccessResult, function(e){ return e.value === that.auditaccessDetail.accessResult });
                 return {
                     auditaccessDetail : this.auditaccessDetail,
                     eventTime : Globalize.format(new Date(this.auditaccessDetail.eventTime),  "MM/dd/yyyy hh:mm:ss tt"),
-                    result : this.auditaccessDetail.accessResult == 1 ? 'Allowed' : 'Denied',
+                    result : result[0].label,
                     hiveQuery : ((this.auditaccessDetail.serviceType === XAEnums.ServiceType.Service_HIVE.label || this.auditaccessDetail.serviceType === XAEnums.ServiceType.Service_HBASE.label) &&
                                 this.auditaccessDetail.aclEnforcer === "ranger-acl" && this.auditaccessDetail.requestData) ? true : false,