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