From 74eaf14c7cccc9005f487cf49989ebda19ca5414 Mon Sep 17 00:00:00 2001 From: Shemy Gan Date: Thu, 31 Oct 2024 15:44:12 -0400 Subject: [PATCH] - Update infrastructure page based on figma --- .../CreateMonitor/index.jsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx b/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx index 87c4c537c..252455b89 100644 --- a/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx +++ b/Client/src/Pages/InfrastructureMonitors/CreateMonitor/index.jsx @@ -3,8 +3,7 @@ import { Box, Button, ButtonGroup, Stack, Typography } from "@mui/material"; import LoadingButton from "@mui/lab/LoadingButton"; import { useSelector, useDispatch } from "react-redux"; import { monitorValidation } from "../../../Validation/validation"; -import { createUptimeMonitor } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice"; -import { checkEndpointResolution } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice"; +import { createInfrastructureMonitor, checkInfrastructureEndpointResolution } from "../../../Features/InfrastructureMonitors/infrastructureMonitorsSlice" import { useNavigate } from "react-router-dom"; import { useTheme } from "@emotion/react"; import { createToast } from "../../../Utils/toastUtils"; @@ -122,7 +121,7 @@ const CreateInfrastructureMonitor = () => { } else { if (infrastructureMonitor.type === "http") { const checkEndpointAction = await dispatch( - checkEndpointResolution({ authToken, monitorURL: form.url }) + checkInfrastructureEndpointResolution({ authToken, monitorURL: form.url }) ); if (checkEndpointAction.meta.requestStatus === "rejected") { createToast({ @@ -140,10 +139,10 @@ const CreateInfrastructureMonitor = () => { userId: user._id, notifications: infrastructureMonitor.notifications, }; - const action = await dispatch(createUptimeMonitor({ authToken, monitor: form })); + const action = await dispatch(createInfrastructureMonitor({ authToken, monitor: form })); if (action.meta.requestStatus === "fulfilled") { - createToast({ body: "Monitor created successfully!" }); - navigate("/monitors"); + createToast({ body: "Infrastructure monitor created successfully!" }); + navigate("/infrastructure-monitors"); } else { createToast({ body: "Failed to create monitor." }); } @@ -152,11 +151,12 @@ const CreateInfrastructureMonitor = () => { //select values const frequencies = [ - { _id: 1, name: "1 minute" }, - { _id: 2, name: "2 minutes" }, - { _id: 3, name: "3 minutes" }, - { _id: 4, name: "4 minutes" }, + { _id: 1, name: "15 seconds" }, + { _id: 2, name: "30 seconds" }, + { _id: 3, name: "1 minute" }, + { _id: 4, name: "2 minutes" }, { _id: 5, name: "5 minutes" }, + { _id: 6, name: "10 minutes" }, ]; return (