Merge pull request #1811 from bluewave-labs/feat/prism-to-checkmate
feat: prism to checkmate
This commit is contained in:
21 files changed
+110
-92
No files matched your search
@@ -138,4 +138,3 @@ Also check other developer and contributor-friendly projects of BlueWave:
|
||||
- [Headcount](https://github.com/bluewave-labs/bluewave-hrm), a complete Human Resource Management platform.
|
||||
- [Guidefox](https://github.com/bluewave-labs/guidefox), an application that helps new users learn how to use your product via hints, tours, popups and banners.
|
||||
- [VerifyWise](https://github.com/bluewave-labs/verifywise), the first open source AI governance platform.
|
||||
|
||||
Generated
+4
@@ -47,6 +47,10 @@
|
||||
"react-toastify": "^10.0.5",
|
||||
"recharts": "2.15.1",
|
||||
"redux-persist": "6.0.0",
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"swiper": "11.2.4",
|
||||
>>>>>>> prism/develop
|
||||
"vite-plugin-svgr": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
+5
-5
@@ -15,13 +15,13 @@
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@fontsource/roboto": "^5.0.13",
|
||||
"@hello-pangea/dnd": "^18.0.0",
|
||||
"@mui/x-charts": "^7.5.1",
|
||||
"@mui/x-data-grid": "7.27.0",
|
||||
"@mui/x-date-pickers": "7.27.0",
|
||||
"@mui/icons-material": "6.4.5",
|
||||
"@mui/lab": "6.0.0-beta.28",
|
||||
"@mui/material": "6.4.5",
|
||||
"@mui/x-charts": "^7.5.1",
|
||||
"@reduxjs/toolkit": "2.6.0",
|
||||
"@mui/x-data-grid": "7.27.0",
|
||||
"@mui/x-date-pickers": "7.27.0",
|
||||
"@solana/wallet-adapter-base": "0.9.23",
|
||||
"@solana/wallet-adapter-material-ui": "0.16.34",
|
||||
"@solana/wallet-adapter-react": "0.15.35",
|
||||
@@ -31,12 +31,12 @@
|
||||
"axios": "^1.7.4",
|
||||
"dayjs": "1.11.13",
|
||||
"flag-icons": "7.3.2",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"maplibre-gl": "5.1.1",
|
||||
"i18next": "^24.2.2",
|
||||
"immutability-helper": "^3.1.1",
|
||||
"joi": "17.13.3",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"maplibre-gl": "5.1.1",
|
||||
"mui-color-input": "^5.0.1",
|
||||
"react": "18.3.1",
|
||||
"react-dnd": "^16.0.1",
|
||||
|
||||
@@ -31,9 +31,7 @@ const ActionsMenu = ({
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
let monitor = { _id: actions.id };
|
||||
const action = await dispatch(
|
||||
deleteUptimeMonitor({ monitor })
|
||||
);
|
||||
const action = await dispatch(deleteUptimeMonitor({ monitor }));
|
||||
if (action.meta.requestStatus === "fulfilled") {
|
||||
setIsOpen(false); // close modal
|
||||
updateRowCallback();
|
||||
@@ -46,9 +44,7 @@ const ActionsMenu = ({
|
||||
const handlePause = async () => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const action = await dispatch(
|
||||
pauseUptimeMonitor({ monitorId: monitor._id })
|
||||
);
|
||||
const action = await dispatch(pauseUptimeMonitor({ monitorId: monitor._id }));
|
||||
if (pauseUptimeMonitor.fulfilled.match(action)) {
|
||||
const state = action?.payload?.data.isActive === false ? "paused" : "resumed";
|
||||
createToast({ body: `Monitor ${state} successfully.` });
|
||||
|
||||
@@ -13,10 +13,8 @@ import { RowContainer } from "../StandardContainer";
|
||||
* @param {number} props.headerLevel - Font characteristic of the header
|
||||
* @param {string} props.subHeaderText - Subheader text
|
||||
* @param {number} props.subHeaderLevel - Font characteristic of the subheader
|
||||
* @param {string} props.rightCatagoryTitle - Message for right section
|
||||
* @param {number} props.rightCatagoryTitleLevel - Font characteristic of the right section header
|
||||
* @param {string} props.rightDescription - Description for right section
|
||||
* @param {number} props.rightDescriptionLevel - Font characteristic of the right section description
|
||||
* @param {string} props.alignItems - Align items
|
||||
* @param {node} props.children - Children
|
||||
* @returns {JSX.Element} The rendered component
|
||||
*/
|
||||
|
||||
@@ -25,16 +23,14 @@ const SubHeader = ({
|
||||
headerLevel = 1,
|
||||
subHeaderText,
|
||||
subHeaderLevel = 1,
|
||||
rightCatagoryTitle,
|
||||
rightCatagoryTitleLevel = 2,
|
||||
rightDescription,
|
||||
rightDescriptionLevel = 2,
|
||||
alignItems = "center",
|
||||
children,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<Stack
|
||||
direction="row"
|
||||
alignItems={alignItems}
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<Stack direction={"column"}>
|
||||
@@ -58,19 +54,7 @@ const SubHeader = ({
|
||||
{subHeaderText}
|
||||
</Typography>
|
||||
</Stack>
|
||||
|
||||
{rightCatagoryTitle && (
|
||||
<RowContainer sx={{ width: "20%" }}>
|
||||
<Stack>
|
||||
<Typography variant={`body${rightCatagoryTitleLevel}`}>
|
||||
{rightCatagoryTitle}
|
||||
</Typography>
|
||||
<Typography variant={`h${rightDescriptionLevel}`}>
|
||||
{rightDescription}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</RowContainer>
|
||||
)}
|
||||
{children}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
@@ -80,10 +64,8 @@ SubHeader.propTypes = {
|
||||
headerLevel: PropTypes.number,
|
||||
subHeaderText: PropTypes.string,
|
||||
subHeaderLevel: PropTypes.number,
|
||||
rightCatagoryTitle: PropTypes.string,
|
||||
rightCatagoryTitleLevel: PropTypes.number,
|
||||
rightDescription: PropTypes.string,
|
||||
rightDescriptionLevel: PropTypes.number,
|
||||
alignItems: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
export default SubHeader;
|
||||
@@ -80,7 +80,7 @@ export const deleteUser = createAsyncThunk("auth/delete", async (_, thunkApi) =>
|
||||
const user = thunkApi.getState().auth.user;
|
||||
|
||||
try {
|
||||
const res = await networkService.deleteUser({ userId: user._id, });
|
||||
const res = await networkService.deleteUser({ userId: user._id });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
|
||||
@@ -32,7 +32,9 @@ export const checkInfrastructureEndpointResolution = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorURL } = data;
|
||||
const res = await networkService.checkEndpointResolution({ monitorURL: monitorURL, });
|
||||
const res = await networkService.checkEndpointResolution({
|
||||
monitorURL: monitorURL,
|
||||
});
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -127,7 +129,7 @@ export const deleteInfrastructureMonitor = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitor } = data;
|
||||
const res = await networkService.deleteMonitorById({ monitorId: monitor._id, });
|
||||
const res = await networkService.deleteMonitorById({ monitorId: monitor._id });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -147,7 +149,7 @@ export const pauseInfrastructureMonitor = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorId } = data;
|
||||
const res = await networkService.pauseMonitorById({ monitorId: monitorId, });
|
||||
const res = await networkService.pauseMonitorById({ monitorId: monitorId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -167,7 +169,7 @@ export const deleteInfrastructureMonitorChecksByTeamId = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { teamId } = data;
|
||||
const res = await networkService.deleteChecksByTeamId({ teamId: teamId, });
|
||||
const res = await networkService.deleteChecksByTeamId({ teamId: teamId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export const createPageSpeed = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitor } = data;
|
||||
const res = await networkService.createMonitor({ monitor: monitor, });
|
||||
const res = await networkService.createMonitor({ monitor: monitor });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -32,7 +32,9 @@ export const checkEndpointResolution = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorURL } = data;
|
||||
const res = await networkService.checkEndpointResolution({ monitorURL: monitorURL, });
|
||||
const res = await networkService.checkEndpointResolution({
|
||||
monitorURL: monitorURL,
|
||||
});
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -52,7 +54,7 @@ export const getPagespeedMonitorById = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorId } = data;
|
||||
const res = await networkService.getMonitorById({ monitorId: monitorId, });
|
||||
const res = await networkService.getMonitorById({ monitorId: monitorId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -124,7 +126,7 @@ export const deletePageSpeed = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitor } = data;
|
||||
const res = await networkService.deleteMonitorById({ monitorId: monitor._id, });
|
||||
const res = await networkService.deleteMonitorById({ monitorId: monitor._id });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -143,7 +145,7 @@ export const pausePageSpeed = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorId } = data;
|
||||
const res = await networkService.pauseMonitorById({ monitorId: monitorId, });
|
||||
const res = await networkService.pauseMonitorById({ monitorId: monitorId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
|
||||
@@ -47,7 +47,7 @@ export const updateAppSettings = createAsyncThunk(
|
||||
systemEmailAddress: settings.systemEmailAddress,
|
||||
systemEmailPassword: settings.systemEmailPassword,
|
||||
};
|
||||
const res = await networkService.updateAppSettings({ settings: parsedSettings, });
|
||||
const res = await networkService.updateAppSettings({ settings: parsedSettings });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
|
||||
@@ -32,7 +32,9 @@ export const checkEndpointResolution = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorURL } = data;
|
||||
const res = await networkService.checkEndpointResolution({ monitorURL: monitorURL, });
|
||||
const res = await networkService.checkEndpointResolution({
|
||||
monitorURL: monitorURL,
|
||||
});
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -52,7 +54,7 @@ export const getUptimeMonitorById = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorId } = data;
|
||||
const res = await networkService.getMonitorById({ monitorId: monitorId, });
|
||||
const res = await networkService.getMonitorById({ monitorId: monitorId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -104,7 +106,7 @@ export const deleteUptimeMonitor = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitor } = data;
|
||||
const res = await networkService.deleteMonitorById({ monitorId: monitor._id, });
|
||||
const res = await networkService.deleteMonitorById({ monitorId: monitor._id });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -124,7 +126,7 @@ export const pauseUptimeMonitor = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { monitorId } = data;
|
||||
const res = await networkService.pauseMonitorById({ monitorId: monitorId, });
|
||||
const res = await networkService.pauseMonitorById({ monitorId: monitorId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
@@ -144,7 +146,7 @@ export const deleteMonitorChecksByTeamId = createAsyncThunk(
|
||||
async (data, thunkApi) => {
|
||||
try {
|
||||
const { teamId } = data;
|
||||
const res = await networkService.deleteChecksByTeamId({ teamId: teamId, });
|
||||
const res = await networkService.deleteChecksByTeamId({ teamId: teamId });
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
if (error.response && error.response.data) {
|
||||
|
||||
@@ -110,6 +110,8 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange })
|
||||
networkError,
|
||||
devices,
|
||||
isLoading,
|
||||
isPublic,
|
||||
isPublished,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -56,7 +56,7 @@ const useSubscribeToMonitors = () => {
|
||||
});
|
||||
setNetworkError(true);
|
||||
}
|
||||
}, [user, getMonitorWithPercentage, theme]);
|
||||
}, [user, getMonitorWithPercentage, theme, isLoading]);
|
||||
return [isLoading, networkError, monitors, monitorsSummary, filteredMonitors];
|
||||
};
|
||||
export { useSubscribeToMonitors };
|
||||
@@ -17,6 +17,7 @@ import PeopleAltOutlinedIcon from "@mui/icons-material/PeopleAltOutlined";
|
||||
import InfoBox from "../../../Components/InfoBox";
|
||||
import StatusHeader from "../../DistributedUptime/Details/Components/StatusHeader";
|
||||
import MonitorsList from "./Components/MonitorsList";
|
||||
import { RowContainer } from "../../../Components/StandardContainer";
|
||||
|
||||
//Utils
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
@@ -162,7 +163,6 @@ const DistributedUptimeStatus = () => {
|
||||
url={url}
|
||||
type="distributed"
|
||||
/>
|
||||
|
||||
<StatusHeader
|
||||
monitor={monitor}
|
||||
connectionStatus={connectionStatus}
|
||||
@@ -172,9 +172,18 @@ const DistributedUptimeStatus = () => {
|
||||
<SubHeader
|
||||
headerText={t("distributedStatusHeaderText")}
|
||||
subHeaderText={t("distributedStatusSubHeaderText")}
|
||||
rightCatagoryTitle={t("distributedRightCatagoryTitle")}
|
||||
rightDescription = {t("distributedRightCatagoryDescription")}
|
||||
/>
|
||||
>
|
||||
<RowContainer>
|
||||
<Stack>
|
||||
<Typography variant={`body2`}>
|
||||
{t("distributedRightCatagoryTitle")}
|
||||
</Typography>
|
||||
<Typography variant={`h2`}>
|
||||
{t("distributedRightCatagoryDescription")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</RowContainer>
|
||||
</SubHeader>
|
||||
|
||||
<NextExpectedCheck
|
||||
lastUpdateTime={monitor?.timeSinceLastCheck ?? 0}
|
||||
@@ -229,10 +238,18 @@ const DistributedUptimeStatus = () => {
|
||||
monitor={monitor}
|
||||
lastUpdateTrigger={lastUpdateTrigger}
|
||||
/>
|
||||
|
||||
<SubHeader
|
||||
headerText={t("distributedStatusServerMonitors")}
|
||||
subHeaderText={t("distributedStatusServerMonitorsDescription")}
|
||||
alignItems="end"
|
||||
>
|
||||
<TimeFrameHeader
|
||||
timeFrame={timeFrame}
|
||||
setTimeFrame={setTimeFrame}
|
||||
/>
|
||||
</SubHeader>
|
||||
|
||||
<MonitorsList
|
||||
monitors={statusPage?.subMonitors}
|
||||
timeFrame={timeFrame}
|
||||
|
||||
@@ -147,9 +147,7 @@ const CreateInfrastructureMonitor = () => {
|
||||
thresholds,
|
||||
};
|
||||
|
||||
const action = await dispatch(
|
||||
createInfrastructureMonitor({ monitor: form })
|
||||
);
|
||||
const action = await dispatch(createInfrastructureMonitor({ monitor: form }));
|
||||
if (action.meta.requestStatus === "fulfilled") {
|
||||
createToast({ body: "Infrastructure monitor created successfully!" });
|
||||
navigate("/infrastructure");
|
||||
|
||||
@@ -132,7 +132,7 @@ const Integrations = () => {
|
||||
>
|
||||
<Typography component="h1">Integrations</Typography>
|
||||
<Typography mb={theme.spacing(12)}>
|
||||
Connect Checkmate to your favorite service.
|
||||
Connect Prism to your favorite service.
|
||||
</Typography>
|
||||
<Grid
|
||||
container
|
||||
|
||||
@@ -70,7 +70,7 @@ const Configure = () => {
|
||||
const expectedValuePlaceholders = {
|
||||
regex: "^[\w.-]+@gmail.com$",
|
||||
equal: "janet@gmail.com",
|
||||
include: "@gmail.com"
|
||||
include: "@gmail.com",
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -451,8 +451,8 @@ const Configure = () => {
|
||||
onChange={(event) => handleChange(event, "interval")}
|
||||
items={frequencies}
|
||||
/>
|
||||
{
|
||||
monitor.type === "http" && <>
|
||||
{monitor.type === "http" && (
|
||||
<>
|
||||
<Select
|
||||
id="match-method"
|
||||
label="Match Method"
|
||||
@@ -466,7 +466,9 @@ const Configure = () => {
|
||||
id="expected-value"
|
||||
label="Expected value"
|
||||
isOptional={true}
|
||||
placeholder={expectedValuePlaceholders[monitor.matchMethod || "equal"]}
|
||||
placeholder={
|
||||
expectedValuePlaceholders[monitor.matchMethod || "equal"]
|
||||
}
|
||||
value={monitor.expectedValue}
|
||||
onChange={(event) => handleChange(event, "expectedValue")}
|
||||
error={errors["expectedValue"] ? true : false}
|
||||
@@ -477,7 +479,8 @@ const Configure = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
The expected value is used to match against response result, and the match determines the status.
|
||||
The expected value is used to match against response result, and
|
||||
the match determines the status.
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
@@ -497,15 +500,22 @@ const Configure = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
This expression will be evaluated against the reponse JSON data and the result will be used to match against the expected value. See
|
||||
<Typography component="a" href="https://jmespath.org/" target="_blank" color="info">
|
||||
This expression will be evaluated against the reponse JSON data
|
||||
and the result will be used to match against the expected value.
|
||||
See
|
||||
<Typography
|
||||
component="a"
|
||||
href="https://jmespath.org/"
|
||||
target="_blank"
|
||||
color="info"
|
||||
>
|
||||
jmespath.org
|
||||
</Typography>
|
||||
for query language documentation.
|
||||
</Typography>
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
)}
|
||||
</Stack>
|
||||
</ConfigBox>
|
||||
<Stack
|
||||
|
||||
@@ -42,7 +42,7 @@ const CreateMonitor = () => {
|
||||
const expectedValuePlaceholders = {
|
||||
regex: "^[\w.-]+@gmail.com$",
|
||||
equal: "janet@gmail.com",
|
||||
include: "@gmail.com"
|
||||
include: "@gmail.com",
|
||||
};
|
||||
|
||||
const monitorTypeMaps = {
|
||||
@@ -416,8 +416,8 @@ const CreateMonitor = () => {
|
||||
onChange={(event) => handleChange(event, "interval")}
|
||||
items={SELECT_VALUES}
|
||||
/>
|
||||
{
|
||||
monitor.type === "http" && <>
|
||||
{monitor.type === "http" && (
|
||||
<>
|
||||
<Select
|
||||
id="match-method"
|
||||
label="Match Method"
|
||||
@@ -431,7 +431,9 @@ const CreateMonitor = () => {
|
||||
id="expected-value"
|
||||
label="Expected value"
|
||||
isOptional={true}
|
||||
placeholder={expectedValuePlaceholders[monitor.matchMethod || "equal"]}
|
||||
placeholder={
|
||||
expectedValuePlaceholders[monitor.matchMethod || "equal"]
|
||||
}
|
||||
value={monitor.expectedValue}
|
||||
onChange={(event) => handleChange(event, "expectedValue")}
|
||||
error={errors["expectedValue"] ? true : false}
|
||||
@@ -442,7 +444,8 @@ const CreateMonitor = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
The expected value is used to match against response result, and the match determines the status.
|
||||
The expected value is used to match against response result, and the
|
||||
match determines the status.
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
@@ -462,15 +465,21 @@ const CreateMonitor = () => {
|
||||
color={theme.palette.primary.contrastTextTertiary}
|
||||
opacity={0.8}
|
||||
>
|
||||
This expression will be evaluated against the reponse JSON data and the result will be used to match against the expected value. See
|
||||
<Typography component="a" href="https://jmespath.org/" target="_blank" color="info">
|
||||
This expression will be evaluated against the reponse JSON data and
|
||||
the result will be used to match against the expected value. See
|
||||
<Typography
|
||||
component="a"
|
||||
href="https://jmespath.org/"
|
||||
target="_blank"
|
||||
color="info"
|
||||
>
|
||||
jmespath.org
|
||||
</Typography>
|
||||
for query language documentation.
|
||||
</Typography>
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
)}
|
||||
</Stack>
|
||||
</ConfigBox>
|
||||
<Stack
|
||||
|
||||
@@ -2,12 +2,7 @@ import { useState } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { networkService } from "../../../../main";
|
||||
import { createToast } from "../../../../Utils/toastUtils";
|
||||
export const useChecksFetch = ({
|
||||
monitorId,
|
||||
dateRange,
|
||||
page,
|
||||
rowsPerPage,
|
||||
}) => {
|
||||
export const useChecksFetch = ({ monitorId, dateRange, page, rowsPerPage }) => {
|
||||
const [checks, setChecks] = useState(undefined);
|
||||
const [checksCount, setChecksCount] = useState(undefined);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
@@ -63,6 +63,7 @@ export const useMonitorFetch = ({
|
||||
rowsPerPage,
|
||||
theme,
|
||||
triggerUpdate,
|
||||
getMonitorWithPercentage,
|
||||
]);
|
||||
return {
|
||||
monitors,
|
||||
|
||||
@@ -124,7 +124,6 @@ const UptimeMonitors = () => {
|
||||
!monitorsAreLoading &&
|
||||
(totalMonitors === 0 || typeof totalMonitors === "undefined")
|
||||
) {
|
||||
|
||||
return (
|
||||
<Fallback
|
||||
vowelStart={true}
|
||||
|
||||
@@ -801,7 +801,7 @@ class NetworkService {
|
||||
"https://api.github.com/repos/bluewave-labs/bluewave-uptime/releases/latest",
|
||||
{
|
||||
headers: {
|
||||
Authorization: null,
|
||||
Authorization: null, // No authorization header for this request
|
||||
},
|
||||
}
|
||||
);
|
||||
@@ -923,7 +923,7 @@ class NetworkService {
|
||||
});
|
||||
}
|
||||
async getDistributedStatusPageByUrl(config) {
|
||||
const { authToken, url, type, timeFrame } = config;
|
||||
const { url, type, timeFrame } = config;
|
||||
const params = new URLSearchParams();
|
||||
params.append("type", type);
|
||||
params.append("timeFrame", timeFrame);
|
||||
@@ -931,7 +931,6 @@ class NetworkService {
|
||||
`/status-page/distributed/${url}?${params.toString()}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
@@ -985,18 +984,19 @@ class NetworkService {
|
||||
URL.revokeObjectURL(form.logo.src);
|
||||
}
|
||||
}
|
||||
|
||||
if (isCreate) {
|
||||
return this.axiosInstance.post(`/status-page`, fd);
|
||||
return this.axiosInstance.post(`/status-page`, fd, {});
|
||||
}
|
||||
|
||||
return this.axiosInstance.put(`/status-page`, fd);
|
||||
return this.axiosInstance.put(`/status-page`, fd, {});
|
||||
}
|
||||
|
||||
async deleteStatusPage(config) {
|
||||
const { url } = config;
|
||||
const encodedUrl = encodeURIComponent(url);
|
||||
|
||||
return this.axiosInstance.delete(`/status-page/${encodedUrl}`);
|
||||
return this.axiosInstance.delete(`/status-page/${encodedUrl}`, {});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user