Merge branch 'develop' into feat/logger
This commit is contained in:
20 files changed
+568
-267
No files matched your search
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import axiosInstance from "../../../../Utils/axiosConfig";
|
||||
import { networkService } from "../../../../main";
|
||||
import { StatusLabel } from "../../../../Components/Label";
|
||||
import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
||||
import ArrowForwardRoundedIcon from "@mui/icons-material/ArrowForwardRounded";
|
||||
@@ -38,13 +38,15 @@ const PaginationTable = ({ monitorId, dateRange }) => {
|
||||
useEffect(() => {
|
||||
const fetchPage = async () => {
|
||||
try {
|
||||
const res = await axiosInstance.get(
|
||||
`/checks/${monitorId}?sortOrder=desc&dateRange=${dateRange}&page=${paginationController.page}&rowsPerPage=${paginationController.rowsPerPage}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
},
|
||||
}
|
||||
const res = await networkService.getChecksByMonitor(
|
||||
authToken,
|
||||
monitorId,
|
||||
"desc",
|
||||
null,
|
||||
dateRange,
|
||||
null,
|
||||
paginationController.page,
|
||||
paginationController.rowsPerPage
|
||||
);
|
||||
setChecks(res.data.data.checks);
|
||||
setChecksCount(res.data.data.checksCount);
|
||||
|
||||
@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
|
||||
import { Box, Skeleton, Stack, Typography, useTheme } from "@mui/material";
|
||||
import { useSelector } from "react-redux";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import axiosInstance from "../../../Utils/axiosConfig";
|
||||
import { networkService } from "../../../main";
|
||||
import MonitorDetailsAreaChart from "../../../Components/Charts/MonitorDetailsAreaChart";
|
||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
||||
import Button from "../../../Components/Button";
|
||||
@@ -122,13 +122,14 @@ const DetailsPage = () => {
|
||||
|
||||
const fetchMonitor = useCallback(async () => {
|
||||
try {
|
||||
const res = await axiosInstance.get(
|
||||
`/monitors/stats/${monitorId}?dateRange=${dateRange}&numToDisplay=50&normalize=true`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
},
|
||||
}
|
||||
const res = await networkService.getStatsByMonitorId(
|
||||
authToken,
|
||||
monitorId,
|
||||
null,
|
||||
null,
|
||||
dateRange,
|
||||
50,
|
||||
true
|
||||
);
|
||||
setMonitor(res.data.data);
|
||||
} catch (error) {
|
||||
@@ -143,13 +144,9 @@ const DetailsPage = () => {
|
||||
|
||||
useEffect(() => {
|
||||
const fetchCertificate = async () => {
|
||||
const res = await axiosInstance.get(
|
||||
`/monitors/certificate/${monitorId}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
},
|
||||
}
|
||||
const res = await networkService.getCertificateExpiry(
|
||||
authToken,
|
||||
monitorId
|
||||
);
|
||||
setCertificateExpiry(res.data.data.certificateDate);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user