From 173a410ca1992f6c4a120836041a45159bf52643 Mon Sep 17 00:00:00 2001 From: Dhaval Rajpara Date: Sun, 7 Sep 2025 18:06:56 +0530 Subject: [PATCH] RANGER-5270 : Audits > Admin tab: Zone name missing in 'Delete Zone Policy' log --- .../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 34f009c874..8d5df0c9c5 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 }) => {
Policy Name: {objectName}
Service Name: {parentObjectName}
+ {policyZoneName?.newValue ? ( +
+ Zone Name: {policyZoneName.newValue} +
+ ) : null}
Created Date: {currentTimeZone(createDate)}
@@ -2902,6 +2912,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
Policy Name: {objectName}
Service Name: {parentObjectName}
+ {policyZoneName?.previousValue ? ( +
+ Zone Name: {policyZoneName.previousValue} +
+ ) : null}
Deleted Date:{currentTimeZone(createDate)}
@@ -3661,6 +3676,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
Policy Name: {objectName}
Service Name: {parentObjectName}
+ {policyZoneName?.previousValue ? ( +
+ Zone Name: {policyZoneName.previousValue} +
+ ) : null}
Deleted Date: {currentTimeZone(createDate)}