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

madhan pushed a commit to branch ranger-2.8
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit c72896aaeeeac3db429f71df5f87647118e6b3fb
Author: Dhaval Rajpara <[email protected]>
AuthorDate: Wed Sep 3 12:56:09 2025 +0530

    RANGER-5270 : Audits > Admin tab: Zone name missing in 'Delete Zone Policy' 
log (#634)
    
    (cherry picked from commit 82082f1ac6abe9a1f5d3c6974ce57110d888ab72)
---
 .../src/views/AuditEvent/AdminLogs/PolicyLogs.jsx  | 26 +++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git 
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx
 
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx
index 34f009c87..8d5df0c9c 100644
--- 
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx
+++ 
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx
@@ -20,7 +20,7 @@
 import React from "react";
 import { Table, Badge, Row, Col } from "react-bootstrap";
 import dateFormat from "dateformat";
-import { ClassTypes } from "../../../utils/XAEnums";
+import { ClassTypes } from "Utils/XAEnums";
 import {
   isEmpty,
   isEqual,
@@ -34,7 +34,7 @@ import {
   includes,
   split
 } from "lodash";
-import { currentTimeZone } from "../../../utils/XAUtils";
+import { currentTimeZone } from "Utils/XAUtils";
 
 export const PolicyLogs = ({ data, reportdata }) => {
   const {
@@ -47,6 +47,10 @@ export const PolicyLogs = ({ data, reportdata }) => {
     objectId
   } = data;
 
+  const policyZoneName = reportdata?.find(
+    (obj) => obj.attributeName === "Zone Name"
+  );
+
   /* CREATE LOGS VARIABLES */
   const createPolicyDetails = reportdata.filter((policy) => {
     return (
@@ -59,7 +63,8 @@ export const PolicyLogs = ({ data, reportdata }) => {
       policy.attributeName != "Deny Exceptions" &&
       policy.attributeName != "Masked Policy Items" &&
       policy.attributeName != "Row level filter Policy Items" &&
-      policy.attributeName != "Validity Schedules"
+      policy.attributeName != "Validity Schedules" &&
+      policy.attributeName != "Zone Name"
     );
   });
 
@@ -1866,6 +1871,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
             </div>
             <div className="fw-bolder">Policy Name: {objectName}</div>
             <div className="fw-bolder">Service Name: {parentObjectName}</div>
+            {policyZoneName?.newValue ? (
+              <div className="fw-bolder">
+                Zone Name: {policyZoneName.newValue}
+              </div>
+            ) : null}
             <div className="fw-bolder">
               Created Date: {currentTimeZone(createDate)}
             </div>
@@ -2902,6 +2912,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
             </div>
             <div className="fw-bolder">Policy Name: {objectName}</div>
             <div className="fw-bolder">Service Name: {parentObjectName}</div>
+            {policyZoneName?.previousValue ? (
+              <div className="fw-bolder">
+                Zone Name: {policyZoneName.previousValue}
+              </div>
+            ) : null}
             <div className="fw-bolder">
               Deleted Date:{currentTimeZone(createDate)}
             </div>
@@ -3661,6 +3676,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
             </div>
             <div className="fw-bolder">Policy Name: {objectName}</div>
             <div className="fw-bolder">Service Name: {parentObjectName}</div>
+            {policyZoneName?.previousValue ? (
+              <div className="fw-bolder">
+                Zone Name: {policyZoneName.previousValue}
+              </div>
+            ) : null}
             <div className="fw-bolder">
               Deleted Date: {currentTimeZone(createDate)}
             </div>

Reply via email to