Skip to content

Commit

Permalink
RANGER-4717 : Skip showing 'Page not found' for wrong value is provid…
Browse files Browse the repository at this point in the history
…ed to a api parameter in Login Session Tab
  • Loading branch information
fimugdha authored and dhavalshah9131 committed Feb 28, 2024
1 parent 736a767 commit bed90ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function Access() {
logsResp = await fetchApi({
url: "assets/accessAudit",
params: params,
skipNavigate: true,
paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: "repeat" });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import React, { useState, useCallback, useRef, useEffect } from "react";
import { useSearchParams, useNavigate } from "react-router-dom";
import { Badge, Row, Col } from "react-bootstrap";
import XATableLayout from "Components/XATableLayout";
import { fetchApi } from "Utils/fetchAPI";
import { AuthStatus, AuthType } from "../../utils/XAEnums";
import AdminModal from "./AdminModal";
import dateFormat from "dateformat";
Expand All @@ -37,7 +38,7 @@ import {
} from "../../utils/XAUtils";
import { Loader } from "../../components/CommonComponents";

function Login_Sessions() {
function LoginSessions() {
const [loginSessionListingData, setLoginSessionLogs] = useState([]);
const [loader, setLoader] = useState(true);
const [sessionId, setSessionId] = useState([]);
Expand Down Expand Up @@ -96,10 +97,10 @@ function Login_Sessions() {
params["sortType"] = getTableSortType(sortBy);
}
try {
const { fetchApi, fetchCSRFConf } = await import("Utils/fetchAPI");
logsResp = await fetchApi({
url: "xusers/authSessions",
params: params
params: params,
skipNavigate: true
});
logs = logsResp.data.vXAuthSessions;
totalCount = logsResp.data.totalCount;
Expand Down Expand Up @@ -410,4 +411,4 @@ function Login_Sessions() {
);
}

export default Login_Sessions;
export default LoginSessions;
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ function Plugins() {
try {
logsResp = await fetchApi({
url: "assets/exportAudit",
params: params
params: params,
skipNavigate: true
});
logs = logsResp.data.vXPolicyExportAudits;
totalCount = logsResp.data.totalCount;
Expand Down

0 comments on commit bed90ca

Please sign in to comment.