This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 0a695104b RANGER-4536: Audit UI updates to support datasets and
projects
0a695104b is described below
commit 0a695104b46928e1809853f5c958140b95a295a6
Author: princeap173 <[email protected]>
AuthorDate: Sun Jan 28 07:29:51 2024 +0530
RANGER-4536: Audit UI updates to support datasets and projects
Signed-off-by: Madhan Neethiraj <[email protected]>
---
.../src/views/AuditEvent/AccessLogs.jsx | 48 ++++++++++++++++++++++
.../src/views/AuditEvent/AccessLogsTable.jsx | 24 ++++++++++-
2 files changed, 71 insertions(+), 1 deletion(-)
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
index 141b06cdb..310685348 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
@@ -708,6 +708,40 @@ function Access() {
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
+ },
+ {
+ Header: "Datasets",
+ accessor: "datasets",
+ Cell: (rawValue) => {
+ let Datasets = [];
+ if (!isEmpty(rawValue.value)) {
+ Datasets = JSON.parse(rawValue.value).sort();
+ } else {
+ return <div className="text-center">--</div>;
+ }
+ return <AccessMoreLess Data={Datasets} />;
+ },
+ width: 140,
+ disableResizing: true,
+ disableSortBy: true,
+ getResizerProps: () => {}
+ },
+ {
+ Header: "Projects",
+ accessor: "projects",
+ Cell: (rawValue) => {
+ let Projects = [];
+ if (!isEmpty(rawValue.value)) {
+ Projects = JSON.parse(rawValue.value).sort();
+ } else {
+ return <div className="text-center">--</div>;
+ }
+ return <AccessMoreLess Data={Projects} />;
+ },
+ width: 140,
+ disableResizing: true,
+ disableSortBy: true,
+ getResizerProps: () => {}
}
],
[]
@@ -889,6 +923,18 @@ function Access() {
urlLabel: "tags",
type: "text"
},
+ {
+ category: "datasets",
+ label: "Datasets",
+ urlLabel: "datasets",
+ type: "text"
+ },
+ {
+ category: "projects",
+ label: "Projects",
+ urlLabel: "projects",
+ type: "text"
+ },
{
category: "requestUser",
label: "User",
@@ -954,6 +1000,8 @@ function Access() {
<br /> <b> Exclude User :</b> Name of User.
<br /> <b> Application :</b> Application.
<br /> <b> Tags :</b> Tag Name.
+ <br /> <b> Datasets:</b> Dataset Name.
+ <br /> <b> Projects:</b> Project Name.
<br /> <b> Permission :</b> Permission
</p>
}
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
index e4c814dca..7781ebd2b 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
@@ -52,7 +52,9 @@ export const AccessLogsTable = ({ data = {} }) => {
eventCount,
zoneName,
requestData,
- tags
+ tags,
+ datasets,
+ projects
} = data;
const copyText = (val) => {
@@ -218,6 +220,26 @@ export const AccessLogsTable = ({ data = {} }) => {
: "--"}
</td>
</tr>
+ <tr>
+ <td>Datasets</td>
+ <td>
+ {!isEmpty(datasets)
+ ? JSON.parse(datasets)
+ .sort()
+ .join(", ")
+ : "--"}
+ </td>
+ </tr>
+ <tr>
+ <td>Projects</td>
+ <td>
+ {!isEmpty(projects)
+ ? JSON.parse(projects)
+ .sort()
+ .join(", ")
+ : "--"}
+ </td>
+ </tr>
</tbody>
</Table>
);