You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by dh...@apache.org on 2023/09/25 14:06:30 UTC
[ranger] 04/04: RANGER-4358: Keep the usersync details popup names same as the backbone js names
This is an automated email from the ASF dual-hosted git repository.
dhavalshah9131 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit f740ad33208618fd47f5d2b314c4978300cbd7c2
Author: princeap173 <pr...@gmail.com>
AuthorDate: Mon Sep 11 15:14:56 2023 +0530
RANGER-4358: Keep the usersync details popup names same as the backbone js names
---
.../src/main/webapp/react-webapp/src/utils/XAEnums.js | 13 +++++++++++++
.../src/views/UserGroupRoleListing/SyncSourceDetails.jsx | 4 +++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js b/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js
index 6e5eb0d5b..194cf3bef 100644
--- a/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js
+++ b/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js
@@ -808,3 +808,16 @@ export const ServiceRequestDataRangerAcl = [
];
export const ServiceRequestDataHadoopAcl = [ServiceType.Service_HDFS.label];
+
+export const UsersyncDetailsKeyDisplayMap = {
+ 'unixBackend': 'Unix',
+ 'fileName': 'File Name',
+ 'syncTime': 'Sync time',
+ 'lastModified': 'Last modified time',
+ 'minUserId': 'Minimum user id',
+ 'minGroupId': 'Minimum group id',
+ 'totalUsersSynced': 'Total number of users synced',
+ 'totalGroupsSynced': 'Total number of groups synced',
+ 'totalUsersDeleted': 'Total number of users marked for delete',
+ 'totalGroupsDeleted': 'Total number of groups marked for delete'
+}
\ No newline at end of file
diff --git a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/SyncSourceDetails.jsx b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/SyncSourceDetails.jsx
index 42a886ef3..105659759 100644
--- a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/SyncSourceDetails.jsx
+++ b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/SyncSourceDetails.jsx
@@ -19,6 +19,8 @@
import React, { useState, useCallback, useRef } from "react";
import { Table } from "react-bootstrap";
+import { UsersyncDetailsKeyDisplayMap } from "../../utils/XAEnums"
+
export function SyncSourceDetails(props) {
const { syncDetails } = props;
return Object.keys(props.syncDetails).length == 0 ? (
@@ -51,7 +53,7 @@ export function SyncSourceDetails(props) {
<tbody>
{Object.entries(props.syncDetails).map(([key, value]) => (
<tr key={key}>
- <td>{key}</td>
+ <td>{UsersyncDetailsKeyDisplayMap[key]? UsersyncDetailsKeyDisplayMap[key]: key}</td>
<td>{value}</td>
</tr>
))}