Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions security-admin/src/main/webapp/react-webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion security-admin/src/main/webapp/react-webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@babel/core": "^7.13.16",
"@babel/preset-env": "^7.14.2",
"@babel/preset-react": "^7.13.13",
"axios": "^1.8.4",
"axios": "^1.12.2",
"babel-loader": "^8.2.2",
"bootstrap": "^5.3.2",
"bootstrap-switch-button-react": "^1.2.0",
Expand Down
27 changes: 17 additions & 10 deletions security-admin/src/main/webapp/react-webapp/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ import React, { Suspense, lazy, Component } from "react";
import { Route, Routes, HashRouter } from "react-router-dom";
import { ToastContainer } from "react-toastify";
import axios from "axios";
import { hasAccessToTab, isUser } from "Utils/XAUtils";
import {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Jira ticket is intended for upgrading Axios from version 1.8.4 to the latest version 1.12.2. However, while reviewing the changes, I noticed several additional modifications beyond the version upgrade, including new if conditions that appear to alter the original logic. Since I'm not fully aware of the context or intent behind these extra changes, could you please explain the purpose and rationale for these modifications (apart from the Axios version upgrade itself)?

hasAccessToTab,
isUser,
isSystemAdmin,
isAuditor
} from "Utils/XAUtils";
import ErrorBoundary from "Views/ErrorBoundary";
import ErrorPage from "Views/ErrorPage";
import { CommonScrollButton, Loader } from "Components/CommonComponents";
Expand Down Expand Up @@ -214,15 +219,17 @@ export default class App extends Component {
);
}

try {
let resp = await fetchApi({
url: `plugins/definitions/name/gds`
});
gdsServiceDef = resp.data;
} catch (error) {
console.error(
`Error occurred while fetching GDS Service Definition or CSRF headers! ${error}`
);
if (isUser() || isSystemAdmin() || isAuditor()) {
try {
let resp = await fetchApi({
url: `plugins/definitions/name/gds`
});
gdsServiceDef = resp.data;
} catch (error) {
console.error(
`Error occurred while fetching GDS Service Definition or CSRF headers! ${error}`
);
}
}

setServiceDef(
Expand Down
Loading