diff --git a/Client/src/App.jsx b/Client/src/App.jsx
index 82c8203a8..5e7ab4e97 100644
--- a/Client/src/App.jsx
+++ b/Client/src/App.jsx
@@ -8,8 +8,8 @@ import NotFound from "./Pages/NotFound";
import Login from "./Pages/Auth/Login";
import Register from "./Pages/Auth/Register/Register";
import Account from "./Pages/Account";
-import Monitors from "./Pages/Monitors/Home";
-import CreateMonitor from "./Pages/Monitors/CreateMonitor";
+import Uptime from "./Pages/Uptime/Home";
+import CreateMonitor from "./Pages/Uptime/CreateUptime";
import CreateInfrastructureMonitor from "./Pages/Infrastructure/CreateMonitor";
import Incidents from "./Pages/Incidents";
import Status from "./Pages/Status";
@@ -20,10 +20,10 @@ import CheckEmail from "./Pages/Auth/CheckEmail";
import SetNewPassword from "./Pages/Auth/SetNewPassword";
import NewPasswordConfirmed from "./Pages/Auth/NewPasswordConfirmed";
import ProtectedRoute from "./Components/ProtectedRoute";
-import Details from "./Pages/Monitors/Details";
+import UptimeDetails from "./Pages/Uptime/Details";
import AdvancedSettings from "./Pages/AdvancedSettings";
import Maintenance from "./Pages/Maintenance";
-import Configure from "./Pages/Monitors/Configure";
+import Configure from "./Pages/Uptime/Configure";
import PageSpeed from "./Pages/PageSpeed";
import CreatePageSpeed from "./Pages/PageSpeed/CreatePageSpeed";
import CreateNewMaintenanceWindow from "./Pages/Maintenance/CreateMaintenance";
@@ -43,8 +43,8 @@ import { Infrastructure } from "./Pages/Infrastructure";
import InfrastructureDetails from "./Pages/Infrastructure/Details";
function App() {
const AdminCheckedRegister = withAdminCheck(Register);
- const MonitorsWithAdminProp = withAdminProp(Monitors);
- const MonitorDetailsWithAdminProp = withAdminProp(Details);
+ const UptimeWithAdminProp = withAdminProp(Uptime);
+ const UptimeDetailsWithAdminProp = withAdminProp(UptimeDetails);
const PageSpeedWithAdminProp = withAdminProp(PageSpeed);
const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails);
const MaintenanceWithAdminProp = withAdminProp(Maintenance);
@@ -92,22 +92,22 @@ function App() {
}
+ element={}
/>
}
+ path="/uptime"
+ element={}
/>
}
/>
}
+ path="/uptime/:monitorId/"
+ element={}
/>
}
/>
},
+ { name: "Uptime", path: "uptime", icon: },
{ name: "Pagespeed", path: "pagespeed", icon: },
{ name: "Infrastructure", path: "infrastructure", icon: },
{ name: "Incidents", path: "incidents", icon: },
@@ -262,10 +262,10 @@ function Sidebar() {
Menu
}
- sx={{
+ sx={{
px: theme.spacing(6),
height: "100%",
- overflow: "hidden"
+ overflow: "hidden",
}}
>
{menu.map((item) =>
diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx
index 6329835ef..a7554a7c1 100644
--- a/Client/src/Pages/Auth/Login.jsx
+++ b/Client/src/Pages/Auth/Login.jsx
@@ -388,7 +388,7 @@ const Login = () => {
useEffect(() => {
if (authToken) {
- navigate("/monitors");
+ navigate("/uptime");
return;
}
networkService
@@ -454,7 +454,7 @@ const Login = () => {
} else {
const action = await dispatch(login(form));
if (action.payload.success) {
- navigate("/monitors");
+ navigate("/uptime");
createToast({
body: "Welcome back! You're successfully logged in.",
});
diff --git a/Client/src/Pages/Auth/Register/Register.jsx b/Client/src/Pages/Auth/Register/Register.jsx
index 2f4c26040..65c20ca40 100644
--- a/Client/src/Pages/Auth/Register/Register.jsx
+++ b/Client/src/Pages/Auth/Register/Register.jsx
@@ -237,7 +237,7 @@ const Register = ({ isSuperAdmin }) => {
if (action.payload.success) {
const authToken = action.payload.data;
localStorage.setItem("token", authToken);
- navigate("/monitors");
+ navigate("/uptime");
createToast({
body: "Welcome! Your account was created successfully.",
});
diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx
index f1d2d0ce2..1e4b64f48 100644
--- a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx
+++ b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx
@@ -12,7 +12,7 @@ import { useNavigate } from "react-router-dom";
import { useTheme } from "@emotion/react";
import { createToast } from "../../../Utils/toastUtils";
import Link from "../../../Components/Link";
-import { ConfigBox } from "../../Monitors/styled";
+import { ConfigBox } from "../../Uptime/styled";
import TextInput from "../../../Components/Inputs/TextInput";
import Select from "../../../Components/Inputs/Select";
import Checkbox from "../../../Components/Inputs/Checkbox";
diff --git a/Client/src/Pages/Infrastructure/Details/index.jsx b/Client/src/Pages/Infrastructure/Details/index.jsx
index 06fb1296a..60dcf68ee 100644
--- a/Client/src/Pages/Infrastructure/Details/index.jsx
+++ b/Client/src/Pages/Infrastructure/Details/index.jsx
@@ -8,7 +8,7 @@ import AreaChart from "../../../Components/Charts/AreaChart";
import { useSelector } from "react-redux";
import { networkService } from "../../../main";
import PulseDot from "../../../Components/Animated/PulseDot";
-import useUtils from "../../Monitors/utils";
+import useUtils from "../../Uptime/utils";
import { useNavigate } from "react-router-dom";
import Empty from "./empty";
import { logger } from "../../../Utils/Logger";
diff --git a/Client/src/Pages/Infrastructure/components/Menu/index.jsx b/Client/src/Pages/Infrastructure/components/Menu/index.jsx
index 9794a34d9..98b3f9878 100644
--- a/Client/src/Pages/Infrastructure/components/Menu/index.jsx
+++ b/Client/src/Pages/Infrastructure/components/Menu/index.jsx
@@ -109,88 +109,6 @@ const InfrastructureMenu = ({ monitor, isAdmin, updateCallback }) => {
},
}}
>
- {/*
- Open site action. Not necessary for infrastructure?
-
- {actions.url !== null ? (
-
- ) : (
- ""
- )}
- */}
-
- {/*
- Incidents. Necessary?
- */}
- {/*
- Configure. Necessary?
- {isAdmin && (
-
- )} */}
- {/*
- Clone. Necessary?
- {isAdmin && (
-
- )} */}
- {/*
- Pause. Necessary?
- const handlePause = async () => {
- try {
- const action = await dispatch(
- pauseUptimeMonitor({ authToken, monitorId: monitor._id })
- );
- if (pauseUptimeMonitor.fulfilled.match(action)) {
- updateCallback();
- const state = action?.payload?.data.isActive === false ? "paused" : "resumed";
- createToast({ body: `Monitor ${state} successfully.` });
- } else {
- throw new Error(action?.error?.message ?? "Failed to pause monitor.");
- }
- } catch (error) {
- logger.error("Error pausing monitor:", monitor._id, error);
- createToast({ body: "Failed to pause monitor." });
- }
- };
- {isAdmin && (
-
- )} */}
{isAdmin && }