This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch ranger-2.5
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.5 by this push:
new a2eb5e452 RANGER-4853: updated ranger-2.5 branch with UI fixes from
master branch
a2eb5e452 is described below
commit a2eb5e45263c1ab4652d93750cc5d2de101a8a26
Author: Dhaval.Rajpara <[email protected]>
AuthorDate: Fri Jul 12 17:17:38 2024 +0530
RANGER-4853: updated ranger-2.5 branch with UI fixes from master branch
Signed-off-by: Madhan Neethiraj <[email protected]>
---
.../main/webapp/react-webapp/src/utils/XAEnums.js | 21 ++++++-------
.../src/views/AuditEvent/AccessLogs.jsx | 2 +-
.../src/views/AuditEvent/AccessLogsTable.jsx | 2 +-
.../AuditEvent/AdminLogs/PolicyViewDetails.jsx | 4 +--
.../src/views/Encryption/KeyCreate.jsx | 2 +-
.../src/views/Encryption/KeyManager.jsx | 2 +-
.../src/views/PermissionsModule/Permissions.jsx | 2 --
.../src/views/Resources/ResourceComp.jsx | 34 +++++++++++-----------
.../UserGroupRoleListing/role_details/RoleForm.jsx | 17 ++++++-----
.../role_details/RoleListing.jsx | 3 --
10 files changed, 44 insertions(+), 45 deletions(-)
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 3178bfaee..cd85f3b06 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
@@ -833,22 +833,23 @@ export const UsersyncDetailsKeyDisplayMap = {
export const pluginStatusColumnInfoMsg = {
Policy: {
title: "Policy (Time details)",
- lastUpdated: "Last updated time of policy.",
- downloadTime: "Time when policy actually downloaded(sync-up with Ranger).",
- activeTime: "Time when policy actually in use for enforcement.",
+ lastUpdated: "Last update time of policies",
+ downloadTime: "Last policies download time (sync-up with Ranger).",
+ activeTime:
+ "Last time the downloaded policies became active for enforcement.",
downloadTimeDelayMsg:
- "Policy is updated but not yet downloaded(sync-up with Ranger).",
+ "Latest update in policies are not yet downloaded (sync-up with
Ranger).",
activationTimeDelayMsg:
- "Policy is updated but not yet used for any enforcement."
+ "Latest update in policies are not yet active for enforcement."
},
Tag: {
title: "Tag Policy (Time details)",
- lastUpdated: "Last updated time of Tag-service.",
- downloadTime: "Time when tag-based policies sync-up with Ranger.",
- activeTime: "Time when tag-based policies in use for enforcement.",
+ lastUpdated: "Last update time of tags.",
+ downloadTime: "Last tags download time (sync-up with Ranger).",
+ activeTime: "Last time the downloaded tags became active for enforcement.",
downloadTimeDelayMsg:
- "Policy is updated but not yet downloaded(sync-up with Ranger).",
+ "Latest update in tags are not yet downloaded (sync-up with Ranger).",
activationTimeDelayMsg:
- "Policy is updated but not yet used for any enforcement."
+ "Latest update in tags are not yet active for enforcement."
}
};
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 e564dd062..ff6807520 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
@@ -322,7 +322,7 @@ function Access() {
const requestDataContent = (requestData) => {
const copyText = (val) => {
- !isEmpty(val) && toast.success("Copied succesfully!!");
+ !isEmpty(val) && toast.success("Copied successfully!!");
return val;
};
return (
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 90720181a..9b489510a 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
@@ -55,7 +55,7 @@ export const AccessLogsTable = ({ data = {} }) => {
} = data;
const copyText = (val) => {
- !isEmpty(val) && toast.success("Copied succesfully!!");
+ !isEmpty(val) && toast.success("Copied successfully!!");
return val;
};
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx
index d91d48343..aa94170cf 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx
@@ -29,12 +29,12 @@ import { ModalLoader } from
"../../../components/CommonComponents";
import { getServiceDef } from "../../../utils/appState";
export function PolicyViewDetails(props) {
+ const isMultiResources = true;
const [access, setAccess] = useState([]);
const [loader, SetLoader] = useState(true);
const [serviceDef, setServiceDef] = useState({});
const { updateServices } = props;
- let { allServiceDefs } = getServiceDef();
- const isMultiResources = true;
+ let { allServiceDefs } = cloneDeep(getServiceDef());
useEffect(() => {
if (props.paramsData.isRevert) {
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyCreate.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyCreate.jsx
index 3fa9cfa57..5a9fe069b 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyCreate.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyCreate.jsx
@@ -136,7 +136,7 @@ function KeyCreate(props) {
data: serviceJson
});
setBlockUI(false);
- toast.success(`Success! Key created succesfully`);
+ toast.success(`Success! Key created successfully`);
navigate(`/kms/keys/edit/manage/${state.detail}`, {
state: {
detail: state.detail
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyManager.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyManager.jsx
index 3661d1d3e..b361e0de9 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyManager.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/Encryption/KeyManager.jsx
@@ -329,7 +329,7 @@ const KeyManager = () => {
params: { provider: onchangeval ? onchangeval.label : "" }
});
setBlockUI(false);
- toast.success(`Success! Key deleted succesfully`);
+ toast.success(`Success! Key deleted successfully`);
if (keydata.length == 1 && currentPageIndex > 1) {
if (typeof resetPage?.page === "function") {
resetPage.page(0);
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/PermissionsModule/Permissions.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/PermissionsModule/Permissions.jsx
index 73c22bc0d..3976ba77c 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/PermissionsModule/Permissions.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/PermissionsModule/Permissions.jsx
@@ -140,7 +140,6 @@ function Permissions() {
},
{
Header: "Groups",
- accessor: "groupPermList",
accessor: (raw) => {
const Groups = raw.groupPermList.map((group) => {
return group.groupName;
@@ -155,7 +154,6 @@ function Permissions() {
},
{
Header: "Users",
- accessor: "userPermList",
accessor: (raw) => {
const Users = raw.userPermList.map((user) => {
return user.userName;
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/Resources/ResourceComp.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/Resources/ResourceComp.jsx
index 8b9cae130..7af1fa3b6 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/Resources/ResourceComp.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/Resources/ResourceComp.jsx
@@ -82,10 +82,9 @@ export default function ResourceComp(props) {
};
const RenderValidateField = ({ name }) =>
- (formValues && formValues[name]?.mandatory && (
- <span className="compulsory-resource">*</span>
- )) ||
- null;
+ (formValues && formValues[name]?.mandatory && <span>*</span>) || (
+ <span> </span>
+ );
const renderResourceSelect = (levelKey, index) => {
let renderLabel = false;
@@ -196,20 +195,21 @@ export default function ResourceComp(props) {
</FormB.Label>
</span>
) : (
- <>
- <Select
- {...input}
- options={getResourceLabelOp(levelKey, index)}
- getOptionLabel={(obj) => obj.label}
- getOptionValue={(obj) => obj.name}
- onChange={(value) =>
- handleResourceChange(value, input, index)
- }
- styles={customStyles}
- isSearchable={false}
- />
+ <div className="resource-drop-down">
+ <span className="w-75">
+ <Select
+ {...input}
+ options={getResourceLabelOp(levelKey, index)}
+ getOptionLabel={(obj) => obj.label}
+ getOptionValue={(obj) => obj.name}
+ onChange={(value) =>
+ handleResourceChange(value, input, index)
+ }
+ isSearchable={false}
+ />
+ </span>
<RenderValidateField name={`resourceName-${levelKey}`} />
- </>
+ </div>
)
) : null
}
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleForm.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleForm.jsx
index d3797e754..eb706e797 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleForm.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleForm.jsx
@@ -107,7 +107,7 @@ function RoleForm() {
preventUnBlock,
blockUI
} = roleFormState;
-
+ const toastId = React.useRef(null);
useEffect(() => {
if (params?.roleID) {
fetchRoleData(params.roleID);
@@ -258,6 +258,9 @@ function RoleForm() {
console.error(`Error occurred while updating Role! ${error}`);
}
}
+ if (toastId.current !== null) {
+ toast.dismiss(toastId.current);
+ }
};
const fetchUserOp = async (inputValue) => {
@@ -537,8 +540,8 @@ function RoleForm() {
<Col sm="8">
<FieldArray name="users">
{({ fields }) => (
- <Table className="table table-striped
table-bordered">
- <thead>
+ <Table className="table table-bordered
fixed-headertable">
+ <thead className="thead-light">
<tr>
<th className="text-center">User Name</th>
<th className="text-center">Is Role Admin</th>
@@ -642,9 +645,9 @@ function RoleForm() {
{({ fields }) => (
<Table
bordered
- className="table table-striped table-bordered"
+ className="table table-bordered fixed-headertable"
>
- <thead>
+ <thead className="thead-light">
<tr>
<th className="text-center">Group Name</th>
<th className="text-center">Is Role Admin</th>
@@ -748,9 +751,9 @@ function RoleForm() {
{({ fields }) => (
<Table
bordered
- className="table table-striped table-bordered"
+ className="table table-bordered fixed-headertable"
>
- <thead>
+ <thead className="thead-light">
<tr>
<th className="text-center">Role Name</th>
<th className="text-center">Is Role Admin</th>
diff --git
a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleListing.jsx
b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleListing.jsx
index df28b2546..9024338d8 100644
---
a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleListing.jsx
+++
b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleListing.jsx
@@ -265,7 +265,6 @@ function Roles() {
},
{
Header: "Users",
- accessor: "users",
accessor: (raw) => {
let usersList = map(raw.users, "name");
return !isEmpty(usersList) ? (
@@ -277,7 +276,6 @@ function Roles() {
},
{
Header: "Groups",
- accessor: "groups",
accessor: (raw) => {
let groupsList = map(raw.groups, "name");
return !isEmpty(groupsList) ? (
@@ -289,7 +287,6 @@ function Roles() {
},
{
Header: "Roles",
- accessor: "roles",
accessor: (raw) => {
let rolesList = map(raw.roles, "name");