From ef746c2afa8f6ba05ce7ae1d0d59cc03e855c612 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Wed, 17 Jul 2024 20:15:45 -0400 Subject: [PATCH 1/6] Doomsday cleanup part 2 --- Client/src/App.jsx | 20 +- .../Dashboard/DashboardProgressBars/index.jsx | 19 - .../Dashboard/DashboardSettingsIcon/index.css | 9 - .../Dashboard/DashboardSettingsIcon/index.jsx | 94 --- Client/src/Mock/sample_data.json | 534 ------------------ .../index.jsx => Auth/CheckEmail.jsx} | 0 .../index.jsx => Auth/ForgotPassword.jsx} | 0 .../Pages/{Login/index.jsx => Auth/Login.jsx} | 0 .../NewPasswordConfirmed.jsx} | 0 .../{Register/index.jsx => Auth/Register.jsx} | 0 .../index.jsx => Auth/SetNewPassword.jsx} | 0 Client/src/Pages/Auth/index.css | 138 +++++ Client/src/Pages/CheckEmail/index.css | 34 -- Client/src/Pages/Details/index.css | 0 Client/src/Pages/ForgotPassword/index.css | 31 - Client/src/Pages/Login/index.css | 58 -- .../CreateMonitor}/index.css | 0 .../CreateMonitor}/index.jsx | 23 +- .../Monitors/Details}/index.css | 0 .../Pages/{ => Monitors}/Details/index.jsx | 8 +- Client/src/Pages/Monitors/index.css | 102 ++++ Client/src/Pages/Monitors/index.jsx | 1 - Client/src/Pages/Monitors/monitors.css | 100 ---- .../src/Pages/NewPasswordConfirmed/index.css | 36 -- Client/src/Pages/Register/index.css | 38 -- Client/src/Pages/SetNewPassword/index.css | 36 -- 26 files changed, 265 insertions(+), 1016 deletions(-) delete mode 100644 Client/src/Components/Dashboard/DashboardProgressBars/index.jsx delete mode 100644 Client/src/Components/Dashboard/DashboardSettingsIcon/index.css delete mode 100644 Client/src/Components/Dashboard/DashboardSettingsIcon/index.jsx delete mode 100644 Client/src/Mock/sample_data.json rename Client/src/Pages/{CheckEmail/index.jsx => Auth/CheckEmail.jsx} (100%) rename Client/src/Pages/{ForgotPassword/index.jsx => Auth/ForgotPassword.jsx} (100%) rename Client/src/Pages/{Login/index.jsx => Auth/Login.jsx} (100%) rename Client/src/Pages/{NewPasswordConfirmed/index.jsx => Auth/NewPasswordConfirmed.jsx} (100%) rename Client/src/Pages/{Register/index.jsx => Auth/Register.jsx} (100%) rename Client/src/Pages/{SetNewPassword/index.jsx => Auth/SetNewPassword.jsx} (100%) create mode 100644 Client/src/Pages/Auth/index.css delete mode 100644 Client/src/Pages/CheckEmail/index.css delete mode 100644 Client/src/Pages/Details/index.css delete mode 100644 Client/src/Pages/ForgotPassword/index.css delete mode 100644 Client/src/Pages/Login/index.css rename Client/src/Pages/{CreateNewMonitor => Monitors/CreateMonitor}/index.css (100%) rename Client/src/Pages/{CreateNewMonitor => Monitors/CreateMonitor}/index.jsx (95%) rename Client/src/{Components/Dashboard/DashboardProgressBars => Pages/Monitors/Details}/index.css (100%) rename Client/src/Pages/{ => Monitors}/Details/index.jsx (95%) delete mode 100644 Client/src/Pages/Monitors/monitors.css delete mode 100644 Client/src/Pages/NewPasswordConfirmed/index.css delete mode 100644 Client/src/Pages/Register/index.css delete mode 100644 Client/src/Pages/SetNewPassword/index.css diff --git a/Client/src/App.jsx b/Client/src/App.jsx index f1c24049a..8c1250f13 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -1,24 +1,24 @@ -import { Routes, Route, Navigate } from "react-router-dom"; +import { Routes, Route } from "react-router-dom"; // import "./App.css"; import NotFound from "./Pages/NotFound"; -import Login from "./Pages/Login"; -import Register from "./Pages/Register"; +import Login from "./Pages/Auth/Login"; +import Register from "./Pages/Auth/Register"; import HomeLayout from "./Layouts/HomeLayout"; import Demo from "./Pages/Demo/Demo"; import PlayGround from "./Pages/PlayGround/PlayGround"; import Account from "./Pages/Account"; import Monitors from "./Pages/Monitors"; -import CreateNewMonitor from "./Pages/CreateNewMonitor"; +import CreateMonitor from "./Pages/Monitors/CreateMonitor"; import Incidents from "./Pages/Incidents"; import Status from "./Pages/Status"; import Integrations from "./Pages/Integrations"; import Settings from "./Pages/Settings"; -import ForgotPassword from "./Pages/ForgotPassword"; -import CheckEmail from "./Pages/CheckEmail"; -import SetNewPassword from "./Pages/SetNewPassword"; -import NewPasswordConfirmed from "./Pages/NewPasswordConfirmed"; +import ForgotPassword from "./Pages/Auth/ForgotPassword"; +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/Details"; +import Details from "./Pages/Monitors/Details"; import Maintenance from "./Pages/Maintenance"; import "react-toastify/dist/ReactToastify.css"; import { ToastContainer } from "react-toastify"; @@ -39,7 +39,7 @@ function App() { /> } + element={} /> { - return ( - - ); -}; - -export default ChartsOverviewDemo; diff --git a/Client/src/Components/Dashboard/DashboardSettingsIcon/index.css b/Client/src/Components/Dashboard/DashboardSettingsIcon/index.css deleted file mode 100644 index ab55dd558..000000000 --- a/Client/src/Components/Dashboard/DashboardSettingsIcon/index.css +++ /dev/null @@ -1,9 +0,0 @@ -#dashboard-setting-menu-item { - width: 135px; - padding: 6px; - margin: 5px 12px; -} - -#menu-appbar { - padding: var(--env-var-spacing-1); -} diff --git a/Client/src/Components/Dashboard/DashboardSettingsIcon/index.jsx b/Client/src/Components/Dashboard/DashboardSettingsIcon/index.jsx deleted file mode 100644 index f01e65900..000000000 --- a/Client/src/Components/Dashboard/DashboardSettingsIcon/index.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import "./index.css"; -import { useState } from "react"; -import Box from "@mui/material/Box"; -import IconButton from "@mui/material/IconButton"; -import Menu from "@mui/material/Menu"; -import Tooltip from "@mui/material/Tooltip"; -import MenuItem from "@mui/material/MenuItem"; -import Typography from "@mui/material/Typography"; -import SvgIcon from "@mui/material/SvgIcon"; -import SettingsIcon from "@mui/icons-material/Settings"; -import { useTheme } from "@mui/material/styles"; - -const settings = [ - "Open Site", - "Detailed View", - "Incidents", - "Configure", - "Remove", -]; - -/** - * DashboardSettings component - * - * A component that provides a settings menu accessible from an icon. - * - * @component - * @example - * return ( - * - * ) - */ -function DashboardSettings() { - const theme = useTheme(); - const [anchorElUser, setAnchorElUser] = useState(null); - - /** - * Handles opening the user menu. - * - * @param {React.MouseEvent} event - The event triggered by clicking the user menu button. - */ - const handleOpenUserMenu = (event) => { - setAnchorElUser(event.currentTarget); - }; - - /** - * Handles closing the user menu. - */ - const handleCloseUserMenu = () => { - setAnchorElUser(null); - }; - - return ( - - - - - - - - {settings.map((setting) => ( - - - {setting} - - - ))} - - - ); -} - -export default DashboardSettings; diff --git a/Client/src/Mock/sample_data.json b/Client/src/Mock/sample_data.json deleted file mode 100644 index b391f4678..000000000 --- a/Client/src/Mock/sample_data.json +++ /dev/null @@ -1,534 +0,0 @@ -{ - "success": true, - "msg": "Got monitor for 666c9146c9bfa20db790b1df successfully\"", - "data": [ - { - "_id": "6671d8469ba14f9f260eed23", - "userId": "666c9146c9bfa20db790b1df", - "name": "Google Monitor", - "description": "Google", - "type": "ping", - "url": "127.0.0.1", - "isActive": true, - "interval": 10000, - "createdAt": "2024-06-18T18:56:06.212Z", - "updatedAt": "2024-06-18T18:56:06.212Z", - "__v": 0, - "checks": [ - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 143, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 70, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 143, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 70, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d8549ba14f9f260eed2d", - "monitorId": "6671d8469ba14f9f260eed23", - "status": false, - "responseTime": 120, - "createdAt": "2024-06-18T18:56:20.016Z", - "updatedAt": "2024-06-18T18:56:20.016Z", - "__v": 0 - }, - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 200, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d8549ba14f9f260eed2d", - "monitorId": "6671d8469ba14f9f260eed23", - "status": false, - "responseTime": 250, - "createdAt": "2024-06-18T18:56:20.016Z", - "updatedAt": "2024-06-18T18:56:20.016Z", - "__v": 0 - }, - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": false, - "responseTime": 180, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d8549ba14f9f260eed2d", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 200, - "createdAt": "2024-06-18T18:56:20.016Z", - "updatedAt": "2024-06-18T18:56:20.016Z", - "__v": 0 - }, - { - "_id": "6671d84a9ba14f9f260eed27", - "monitorId": "6671d8469ba14f9f260eed23", - "status": false, - "responseTime": 100, - "createdAt": "2024-06-18T18:56:10.082Z", - "updatedAt": "2024-06-18T18:56:10.082Z", - "__v": 0 - }, - { - "_id": "6671d8549ba14f9f260eed2d", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 210, - "createdAt": "2024-06-18T18:56:20.016Z", - "updatedAt": "2024-06-18T18:56:20.016Z", - "__v": 0 - }, - { - "_id": "6671d85e9ba14f9f260eed3c", - "monitorId": "6671d8469ba14f9f260eed23", - "status": true, - "responseTime": 200, - "createdAt": "2024-06-18T18:56:30.050Z", - "updatedAt": "2024-06-18T18:56:30.050Z", - "__v": 0 - } - ] - }, - { - "_id": "6671d8529ba14f9f260eed2b", - "userId": "666c9146c9bfa20db790b1df", - "name": "Google Monitor", - "description": "Google", - "type": "http", - "url": "https://www.google.com/404", - "isActive": true, - "interval": 10000, - "createdAt": "2024-06-18T18:56:18.555Z", - "updatedAt": "2024-06-18T18:56:18.555Z", - "__v": 0, - "checks": [ - { - "_id": "6671d8549ba14f9f260eed31", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 167, - "statusCode": 404, - "createdAt": "2024-06-18T18:56:20.190Z", - "updatedAt": "2024-06-18T18:56:20.190Z", - "__v": 0 - }, - { - "_id": "6671d85e9ba14f9f260eed3e", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 228, - "statusCode": 404, - "createdAt": "2024-06-18T18:56:30.279Z", - "updatedAt": "2024-06-18T18:56:30.279Z", - "__v": 0 - }, - { - "_id": "6671d8669ba14f9f260eed47", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 112, - "statusCode": 200, - "createdAt": "2024-06-18T18:56:38.381Z", - "updatedAt": "2024-06-18T18:56:38.381Z", - "__v": 0 - }, - { - "_id": "6671d8809ba14f9f260eed6b", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 134, - "statusCode": 200, - "createdAt": "2024-06-18T18:57:04.846Z", - "updatedAt": "2024-06-18T18:57:04.846Z", - "__v": 0 - }, - { - "_id": "6671d86d9ba14f9f260eed50", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 301, - "statusCode": 404, - "createdAt": "2024-06-18T18:56:45.492Z", - "updatedAt": "2024-06-18T18:56:45.492Z", - "__v": 0 - }, - { - "_id": "6671d8739ba14f9f260eed59", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 84, - "statusCode": 200, - "createdAt": "2024-06-18T18:56:51.614Z", - "updatedAt": "2024-06-18T18:56:51.614Z", - "__v": 0 - }, - { - "_id": "6671d87a9ba14f9f260eed62", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 189, - "statusCode": 404, - "createdAt": "2024-06-18T18:56:58.734Z", - "updatedAt": "2024-06-18T18:56:58.734Z", - "__v": 0 - }, - { - "_id": "6671d8809ba14f9f260eed6b", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 134, - "statusCode": 200, - "createdAt": "2024-06-18T18:57:04.846Z", - "updatedAt": "2024-06-18T18:57:04.846Z", - "__v": 0 - }, - { - "_id": "6671d8549ba14f9f260eed31", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 167, - "statusCode": 404, - "createdAt": "2024-06-18T18:56:20.190Z", - "updatedAt": "2024-06-18T18:56:20.190Z", - "__v": 0 - }, - { - "_id": "6671d85e9ba14f9f260eed3e", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 228, - "statusCode": 404, - "createdAt": "2024-06-18T18:56:30.279Z", - "updatedAt": "2024-06-18T18:56:30.279Z", - "__v": 0 - }, - { - "_id": "6671d8669ba14f9f260eed47", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 112, - "statusCode": 200, - "createdAt": "2024-06-18T18:56:38.381Z", - "updatedAt": "2024-06-18T18:56:38.381Z", - "__v": 0 - }, - { - "_id": "6671d8879ba14f9f260eed74", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 247, - "statusCode": 404, - "createdAt": "2024-06-18T18:57:11.958Z", - "updatedAt": "2024-06-18T18:57:11.958Z", - "__v": 0 - } - ] - }, - { - "_id": "6671d8619ba14f9f260eed4c", - "userId": "666c9146c9bfa20db790b1df", - "name": "Amazon Monitor", - "description": "Amazon website", - "type": "http", - "url": "https://www.amazon.com", - "isActive": true, - "interval": 15000, - "createdAt": "2024-06-18T18:56:49.419Z", - "updatedAt": "2024-06-18T18:56:49.419Z", - "__v": 0, - "checks": [ - { - "_id": "6671d8919ba14f9f260eed7d", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 92, - "statusCode": 200, - "createdAt": "2024-06-18T18:57:21.076Z", - "updatedAt": "2024-06-18T18:57:21.076Z", - "__v": 0 - }, - { - "_id": "6671d8989ba14f9f260eed86", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 205, - "statusCode": 404, - "createdAt": "2024-06-18T18:57:28.188Z", - "updatedAt": "2024-06-18T18:57:28.188Z", - "__v": 0 - }, - { - "_id": "6671d89e9ba14f9f260eed8f", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 159, - "statusCode": 200, - "createdAt": "2024-06-18T18:57:34.300Z", - "updatedAt": "2024-06-18T18:57:34.300Z", - "__v": 0 - }, - { - "_id": "6671d8a59ba14f9f260eed98", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 271, - "statusCode": 404, - "createdAt": "2024-06-18T18:57:41.421Z", - "updatedAt": "2024-06-18T18:57:41.421Z", - "__v": 0 - }, - { - "_id": "6671d8ac9ba14f9f260eeda1", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 127, - "statusCode": 200, - "createdAt": "2024-06-18T18:57:48.532Z", - "updatedAt": "2024-06-18T18:57:48.532Z", - "__v": 0 - }, - { - "_id": "6671d8a59ba14f9f260eed98", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 271, - "statusCode": 404, - "createdAt": "2024-06-18T18:57:41.421Z", - "updatedAt": "2024-06-18T18:57:41.421Z", - "__v": 0 - }, - { - "_id": "6671d8ac9ba14f9f260eeda1", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 127, - "statusCode": 200, - "createdAt": "2024-06-18T18:57:48.532Z", - "updatedAt": "2024-06-18T18:57:48.532Z", - "__v": 0 - }, - { - "_id": "6671d8b29ba14f9f260eedaa", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 193, - "statusCode": 404, - "createdAt": "2024-06-18T18:57:54.643Z", - "updatedAt": "2024-06-18T18:57:54.643Z", - "__v": 0 - }, - { - "_id": "6671d8b89ba14f9f260eedb3", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 104, - "statusCode": 200, - "createdAt": "2024-06-18T18:58:00.754Z", - "updatedAt": "2024-06-18T18:58:00.754Z", - "__v": 0 - }, - { - "_id": "6671d8bf9ba14f9f260eedbc", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 231, - "statusCode": 404, - "createdAt": "2024-06-18T18:58:07.865Z", - "updatedAt": "2024-06-18T18:58:07.865Z", - "__v": 0 - }, - { - "_id": "6671d8c59ba14f9f260eedc5", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 147, - "statusCode": 200, - "createdAt": "2024-06-18T18:58:13.977Z", - "updatedAt": "2024-06-18T18:58:13.977Z", - "__v": 0 - }, - { - "_id": "6671d8cc9ba14f9f260eedce", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 283, - "statusCode": 404, - "createdAt": "2024-06-18T18:58:20.088Z", - "updatedAt": "2024-06-18T18:58:20.088Z", - "__v": 0 - } - ] - }, - { - "_id": "6671d8789ba14f9f260eed66", - "userId": "666c9146c9bfa20db790b1df", - "name": "Facebook Monitor", - "description": "Facebook website", - "type": "http", - "url": "https://www.facebook.com", - "isActive": true, - "interval": 20000, - "createdAt": "2024-06-18T18:57:12.798Z", - "updatedAt": "2024-06-18T18:57:12.798Z", - "__v": 0, - "checks": [ - { - "_id": "6671d8d29ba14f9f260eedd7", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 81, - "statusCode": 200, - "createdAt": "2024-06-18T18:58:26.199Z", - "updatedAt": "2024-06-18T18:58:26.199Z", - "__v": 0 - }, - { - "_id": "6671d8d89ba14f9f260eede0", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 218, - "statusCode": 404, - "createdAt": "2024-06-18T18:58:32.311Z", - "updatedAt": "2024-06-18T18:58:32.311Z", - "__v": 0 - }, - { - "_id": "6671d8df9ba14f9f260eede9", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 138, - "statusCode": 200, - "createdAt": "2024-06-18T18:58:39.422Z", - "updatedAt": "2024-06-18T18:58:39.422Z", - "__v": 0 - }, - { - "_id": "6671d8e59ba14f9f260eedf2", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 257, - "statusCode": 404, - "createdAt": "2024-06-18T18:58:45.533Z", - "updatedAt": "2024-06-18T18:58:45.533Z", - "__v": 0 - }, - { - "_id": "6671d8eb9ba14f9f260eedfb", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 116, - "statusCode": 200, - "createdAt": "2024-06-18T18:58:51.644Z", - "updatedAt": "2024-06-18T18:58:51.644Z", - "__v": 0 - }, - { - "_id": "6671d8f19ba14f9f260eee04", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 184, - "statusCode": 404, - "createdAt": "2024-06-18T18:58:57.755Z", - "updatedAt": "2024-06-18T18:58:57.755Z", - "__v": 0 - }, - { - "_id": "6671d8f79ba14f9f260eee0d", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 97, - "statusCode": 200, - "createdAt": "2024-06-18T18:59:03.867Z", - "updatedAt": "2024-06-18T18:59:03.867Z", - "__v": 0 - }, - { - "_id": "6671d8fd9ba14f9f260eee16", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 240, - "statusCode": 404, - "createdAt": "2024-06-18T18:59:09.978Z", - "updatedAt": "2024-06-18T18:59:09.978Z", - "__v": 0 - }, - { - "_id": "6671d9039ba14f9f260eee1f", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 135, - "statusCode": 200, - "createdAt": "2024-06-18T18:59:16.089Z", - "updatedAt": "2024-06-18T18:59:16.089Z", - "__v": 0 - }, - { - "_id": "6671d8d89ba14f9f260eede0", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 218, - "statusCode": 404, - "createdAt": "2024-06-18T18:58:32.311Z", - "updatedAt": "2024-06-18T18:58:32.311Z", - "__v": 0 - }, - { - "_id": "6671d8df9ba14f9f260eede9", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": true, - "responseTime": 138, - "statusCode": 200, - "createdAt": "2024-06-18T18:58:39.422Z", - "updatedAt": "2024-06-18T18:58:39.422Z", - "__v": 0 - }, - { - "_id": "6671d9089ba14f9f260eee28", - "monitorId": "6671d8529ba14f9f260eed2b", - "status": false, - "responseTime": 269, - "statusCode": 404, - "createdAt": "2024-06-18T18:59:22.200Z", - "updatedAt": "2024-06-18T18:59:22.200Z", - "__v": 0 - } -] - } - ] -} \ No newline at end of file diff --git a/Client/src/Pages/CheckEmail/index.jsx b/Client/src/Pages/Auth/CheckEmail.jsx similarity index 100% rename from Client/src/Pages/CheckEmail/index.jsx rename to Client/src/Pages/Auth/CheckEmail.jsx diff --git a/Client/src/Pages/ForgotPassword/index.jsx b/Client/src/Pages/Auth/ForgotPassword.jsx similarity index 100% rename from Client/src/Pages/ForgotPassword/index.jsx rename to Client/src/Pages/Auth/ForgotPassword.jsx diff --git a/Client/src/Pages/Login/index.jsx b/Client/src/Pages/Auth/Login.jsx similarity index 100% rename from Client/src/Pages/Login/index.jsx rename to Client/src/Pages/Auth/Login.jsx diff --git a/Client/src/Pages/NewPasswordConfirmed/index.jsx b/Client/src/Pages/Auth/NewPasswordConfirmed.jsx similarity index 100% rename from Client/src/Pages/NewPasswordConfirmed/index.jsx rename to Client/src/Pages/Auth/NewPasswordConfirmed.jsx diff --git a/Client/src/Pages/Register/index.jsx b/Client/src/Pages/Auth/Register.jsx similarity index 100% rename from Client/src/Pages/Register/index.jsx rename to Client/src/Pages/Auth/Register.jsx diff --git a/Client/src/Pages/SetNewPassword/index.jsx b/Client/src/Pages/Auth/SetNewPassword.jsx similarity index 100% rename from Client/src/Pages/SetNewPassword/index.jsx rename to Client/src/Pages/Auth/SetNewPassword.jsx diff --git a/Client/src/Pages/Auth/index.css b/Client/src/Pages/Auth/index.css new file mode 100644 index 000000000..c414ffaea --- /dev/null +++ b/Client/src/Pages/Auth/index.css @@ -0,0 +1,138 @@ +/* ////// */ +/* SHARED */ +/* ////// */ +.register-page, +.login-page, +.set-new-password-page, +.password-confirmed-page, +.forgot-password-page, +.check-email-page { + display: flex; + justify-content: center; + height: var(--env-var-height-1); +} +.register-page h1.MuiTypography-root, +.set-new-password-page h1.MuiTypography-root, +.password-confirmed-page h1.MuiTypography-root, +.forgot-password-page h1.MuiTypography-root, +.check-email-page h1.MuiTypography-root { + font-size: var(--env-var-font-size-large); + color: var(--env-var-color-1); + font-weight: 600; +} +.register-page p.MuiTypography-root, +.register-page span, +.register-page button, +.login-page p.MuiTypography-root, +.login-page span, +.login-page button, +.set-new-password-page p.MuiTypography-root, +.set-new-password-page button, +.password-confirmed-page p.MuiTypography-root, +.password-confirmed-page button, +.forgot-password-page p.MuiTypography-root, +.forgot-password-page button, +.check-email-page p.MuiTypography-root, +.check-email-page button, +.check-email-page span.MuiTypography-root { + font-size: var(--env-var-font-size-medium); +} +.register-page p.MuiTypography-root, +.login-page p.MuiTypography-root { + color: var(--env-var-color-2); + opacity: 0.8; +} +.register-page button:not(.MuiIconButton-root), +.login-page button:not(.MuiIconButton-root), +.set-new-password-page button:not(.MuiIconButton-root), +.password-confirmed-page button:not(.MuiIconButton-root), +.forgot-password-page button:not(.MuiIconButton-root), +.check-email-page button:not(.MuiIconButton-root) { + height: 34px; + border-radius: var(--env-var-radius-2); + line-height: 0; +} + +.register-page svg rect, +.login-page svg rect { + fill: none; +} +.register-form, +.login-form { + margin-top: 95px; +} + +.set-new-password-form, +.password-confirmed-form, +.forgot-password-form, +.check-email-form { + margin-top: 65px; + width: var(--env-var-width-2); +} +.set-new-password-page p.MuiTypography-root, +.password-confirmed-page p.MuiTypography-root, +.forgot-password-page p.MuiTypography-root, +.check-email-page p.MuiTypography-root { + color: var(--env-var-color-2); +} + +.login-page .MuiFormControlLabel-root .MuiButtonBase-root, +.set-new-password-page button:not(.MuiIconButton-root) svg, +.password-confirmed-page button:not(.MuiIconButton-root) svg, +.forgot-password-page button svg, +.check-email-page button svg { + margin-right: 5px; +} + +.register-page + .MuiFormControl-root:has(#register-password-input) + + span.MuiTypography-root, +.set-new-password-page + .MuiFormControl-root:has(#register-password-input) + + span.MuiTypography-root, +.password-confirmed-page + .MuiFormControl-root:has(#register-password-input) + + span.MuiTypography-root { + display: none; + visibility: hidden; +} + +/* REGISTER */ +.register-page h1.MuiTypography-root { + opacity: 0.5; +} + +/* ///// */ +/* LOGIN */ +/* ///// */ +.login-page span:not(.MuiTypography-root):not(.MuiButtonBase-root) { + color: var(--env-var-color-3); + cursor: pointer; + font-weight: 600; +} +.login-page .MuiFormControlLabel-root { + margin: 0; +} +.login-page .MuiFormControlLabel-root span:not(.Mui-checked) svg { + fill: var(--env-var-color-4); +} +.login-page .MuiFormControlLabel-root svg { + margin-bottom: 1px; +} +.login-page .MuiFormControlLabel-root .MuiTypography-root { + color: var(--env-var-color-5); + user-select: none; +} + +.google-enter { + width: var(--env-var-img-width-1); + height: var(--env-var-img-width-1); + margin-right: 10px; +} + +/* /////////// */ +/* Check Email */ +/* /////////// */ +.check-email-page span.MuiTypography-root { + font-weight: 600; +} diff --git a/Client/src/Pages/CheckEmail/index.css b/Client/src/Pages/CheckEmail/index.css deleted file mode 100644 index fbf3e47af..000000000 --- a/Client/src/Pages/CheckEmail/index.css +++ /dev/null @@ -1,34 +0,0 @@ -.check-email-page { - display: flex; - justify-content: center; - height: var(--env-var-height-1); -} -.check-email-page button:not(.MuiIconButton-root) { - height: 34px; - border-radius: var(--env-var-radius-2); - line-height: 0; -} -.check-email-page h1.MuiTypography-root { - font-size: var(--env-var-font-size-large); - color: var(--env-var-color-1); - font-weight: 600; -} -.check-email-page p.MuiTypography-root, -.check-email-page button, -.check-email-page span.MuiTypography-root { - font-size: var(--env-var-font-size-medium); -} -.check-email-page span.MuiTypography-root { - font-weight: 600; -} -.check-email-page p.MuiTypography-root { - color: var(--env-var-color-2); -} -.check-email-page button svg { - margin-right: 5px; -} - -.check-email-form { - margin-top: 65px; - width: var(--env-var-width-2); -} diff --git a/Client/src/Pages/Details/index.css b/Client/src/Pages/Details/index.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/Client/src/Pages/ForgotPassword/index.css b/Client/src/Pages/ForgotPassword/index.css deleted file mode 100644 index 7ef02f4a0..000000000 --- a/Client/src/Pages/ForgotPassword/index.css +++ /dev/null @@ -1,31 +0,0 @@ -.forgot-password-page { - display: flex; - justify-content: center; - height: var(--env-var-height-1); -} -.forgot-password-page button:not(.MuiIconButton-root) { - height: 34px; - border-radius: var(--env-var-radius-2); - line-height: 0; -} -.forgot-password-page h1.MuiTypography-root { - font-size: var(--env-var-font-size-large); - color: var(--env-var-color-1); - font-weight: 600; -} -.forgot-password-page p.MuiTypography-root, -.forgot-password-page button { - font-size: var(--env-var-font-size-medium); -} -.forgot-password-page p.MuiTypography-root { - color: var(--env-var-color-2); -} -.forgot-password-page button svg{ - margin-right: 5px; -} - - -.forgot-password-form { - margin-top: 65px; - width: var(--env-var-width-2); -} diff --git a/Client/src/Pages/Login/index.css b/Client/src/Pages/Login/index.css deleted file mode 100644 index e94ea8a00..000000000 --- a/Client/src/Pages/Login/index.css +++ /dev/null @@ -1,58 +0,0 @@ -.login-page { - width: var(--env-var-width-1); - display: flex; - justify-content: center; - height: 100vh; -} -.login-page svg rect { - fill: none; -} -.login-page p.MuiTypography-root, -.login-page span, -.login-page button { - font-size: var(--env-var-font-size-medium); -} -.login-page p.MuiTypography-root { - color: var(--env-var-color-2); - opacity: 0.8; -} -.login-page button:not(.MuiIconButton-root) { - height: 34px; - border-radius: var(--env-var-radius-2); - line-height: 0; -} -.login-page span:not(.MuiTypography-root):not(.MuiButtonBase-root) { - color: var(--env-var-color-3); - cursor: pointer; - font-weight: 600; -} -.login-page .MuiFormControlLabel-root { - margin: 0; -} -.login-page .MuiFormControlLabel-root .MuiButtonBase-root { - margin-right: 5px; -} -.login-page .MuiFormControlLabel-root span:not(.Mui-checked) svg{ - fill: var(--env-var-color-4); -} -.login-page .MuiFormControlLabel-root svg{ - margin-bottom: 1px; -} -.login-page .MuiFormControlLabel-root .MuiTypography-root { - color: var(--env-var-color-5); - user-select: none; -} - -/* .login-form-inputs .field h3.MuiTypography-root{ - font-weight: 600; -} */ - -.login-form{ - margin-top: 95px; -} - -.google-enter { - width: var(--env-var-img-width-1); - height: var(--env-var-img-width-1); - margin-right: 10px; -} \ No newline at end of file diff --git a/Client/src/Pages/CreateNewMonitor/index.css b/Client/src/Pages/Monitors/CreateMonitor/index.css similarity index 100% rename from Client/src/Pages/CreateNewMonitor/index.css rename to Client/src/Pages/Monitors/CreateMonitor/index.css diff --git a/Client/src/Pages/CreateNewMonitor/index.jsx b/Client/src/Pages/Monitors/CreateMonitor/index.jsx similarity index 95% rename from Client/src/Pages/CreateNewMonitor/index.jsx rename to Client/src/Pages/Monitors/CreateMonitor/index.jsx index cb10a49e1..1b19c2bde 100644 --- a/Client/src/Pages/CreateNewMonitor/index.jsx +++ b/Client/src/Pages/Monitors/CreateMonitor/index.jsx @@ -1,19 +1,18 @@ import "./index.css"; -import ConfigBox from "../../Components/ConfigBox"; +import ConfigBox from "../../../Components/ConfigBox"; import React, { useState } from "react"; -import RadioButton from "../../Components/RadioButton"; -import CustomizableCheckBox from "../../Components/Checkbox/CustomizableCheckbox"; -import Button from "../../Components/Button"; +import RadioButton from "../../../Components/RadioButton"; +import Button from "../../../Components/Button"; import { Box, MenuItem, Select, Stack, Typography } from "@mui/material"; import { useSelector, useDispatch } from "react-redux"; -import { createMonitorValidation } from "../../Validation/validation"; -import { createMonitor } from "../../Features/Monitors/monitorsSlice"; +import { createMonitorValidation } from "../../../Validation/validation"; +import { createMonitor } from "../../../Features/Monitors/monitorsSlice"; import { useNavigate } from "react-router-dom"; import { useTheme } from "@emotion/react"; import WestRoundedIcon from "@mui/icons-material/WestRounded"; -import Field from "../../Components/Inputs/Field"; +import Field from "../../../Components/Inputs/Field"; -const CreateNewMonitor = () => { +const CreateMonitor = () => { const MS_PER_MINUTE = 60000; const { user, authToken } = useSelector((state) => state.auth); const dispatch = useDispatch(); @@ -81,7 +80,7 @@ const CreateNewMonitor = () => { // })); // }; - const handleCreateNewMonitor = async (event) => { + const handleCreateMonitor = async (event) => { event.preventDefault(); //obj to submit let monitor = { @@ -126,7 +125,7 @@ const CreateNewMonitor = () => { return (
{ level="primary" label="Create new monitor" sx={{ width: "210px", fontSize: "var(--env-var-font-size-medium)" }} - onClick={handleCreateNewMonitor} + onClick={handleCreateMonitor} disabled={Object.keys(errors).length !== 0 && true} /> @@ -449,4 +448,4 @@ const CreateNewMonitor = () => { ); }; -export default CreateNewMonitor; +export default CreateMonitor; diff --git a/Client/src/Components/Dashboard/DashboardProgressBars/index.css b/Client/src/Pages/Monitors/Details/index.css similarity index 100% rename from Client/src/Components/Dashboard/DashboardProgressBars/index.css rename to Client/src/Pages/Monitors/Details/index.css diff --git a/Client/src/Pages/Details/index.jsx b/Client/src/Pages/Monitors/Details/index.jsx similarity index 95% rename from Client/src/Pages/Details/index.jsx rename to Client/src/Pages/Monitors/Details/index.jsx index 1c700adad..38f25402f 100644 --- a/Client/src/Pages/Details/index.jsx +++ b/Client/src/Pages/Monitors/Details/index.jsx @@ -3,10 +3,10 @@ import PropTypes from "prop-types"; import { Box, Typography, useTheme } from "@mui/material"; import { useSelector } from "react-redux"; import { useParams } from "react-router-dom"; -import axiosInstance from "../../Utils/axiosConfig"; -import BasicTable from "../../Components/BasicTable"; -import MonitorDetailsAreaChart from "../../Components/Charts/MonitorDetailsAreaChart"; -import { StatusLabel } from "../../Components/Label"; +import axiosInstance from "../../../Utils/axiosConfig"; +import BasicTable from "../../../Components/BasicTable"; +import MonitorDetailsAreaChart from "../../../Components/Charts/MonitorDetailsAreaChart"; +import { StatusLabel } from "../../../Components/Label"; const formatDuration = (ms) => { const seconds = Math.floor(ms / 1000); diff --git a/Client/src/Pages/Monitors/index.css b/Client/src/Pages/Monitors/index.css index a21a3e125..c680b4942 100644 --- a/Client/src/Pages/Monitors/index.css +++ b/Client/src/Pages/Monitors/index.css @@ -101,3 +101,105 @@ width: 226.8px; height: 20px; } + +/* TODO */ +.current-monitors { + margin-top: var(--env-var-spacing-2); + border: 1px solid #eaecf0; + padding: 40px; + border-radius: 4px; +} + +.current-monitors-title-holder { + display: flex; + align-items: center; +} + +.current-monitors-bar { + display: flex; + justify-content: space-between; +} + +.current-monitors-title { + font-size: 1rem; + font-weight: bold; + margin-right: var(--env-var-spacing-1); + color: var(--env-var-color-1); +} + +.current-monitors-counter { + display: inline-flex; + justify-content: center; + align-items: center; + padding: 2px; + min-width: 22px; + min-height: 22px; + background-color: var(--env-var-color-15); + border: 1px solid var(--env-var-color-6); + border-radius: 50%; + font-size: var(--env-var-font-size-medium); + font-weight: 500; + color: var(--env-var-color-5); +} + +.monitors-v-gaping { + height: var(--env-var-spacing-3); +} + +.current-monitors-table { + width: 100%; + text-align: left; +} + +.current-monitors-table { + width: 100%; + text-align: left; + border-collapse: collapse; + border: 1px solid var(--env-var-color-16); + border-radius: var(--env-var-radius-1); +} + +.current-monitors-table th, +.current-monitors-table td { + border: 1px solid var(--env-var-color-16); + border-left: none; + border-right: none; + padding: 8px; +} + +.theader-row { + background-color: var(--env-var-color-13); + color: var(--env-var-color-2); + font-weight: 500; +} + +.theader-row td { + padding: var(--env-var-spacing-1) var(--env-var-spacing-2); + font-size: var(--env-var-font-size-medium); +} + +.host-list-item-precentage { + font-size: var(--env-var-font-size-medium); +} + +.tbody-row td { + padding: var(--env-var-spacing-2) var(--env-var-img-width-2); +} + +.host-status-box { + display: flex; + width: fit-content; + border: 1px solid var(--env-var-color-4); + border-radius: var(--env-var-radius-2); + align-items: center; + padding: calc(var(--env-var-spacing-1) / 2); +} + +.host-actions { + margin: auto; + cursor: pointer; +} + +.tbody-row-cell.actions-cell { + padding-left: 30px; +} diff --git a/Client/src/Pages/Monitors/index.jsx b/Client/src/Pages/Monitors/index.jsx index 55898c5fe..dd18df888 100644 --- a/Client/src/Pages/Monitors/index.jsx +++ b/Client/src/Pages/Monitors/index.jsx @@ -1,5 +1,4 @@ import "./index.css"; -import "./monitors.css"; import { useEffect } from "react"; import { useSelector, useDispatch } from "react-redux"; import { getMonitorsByUserId } from "../../Features/Monitors/monitorsSlice"; diff --git a/Client/src/Pages/Monitors/monitors.css b/Client/src/Pages/Monitors/monitors.css deleted file mode 100644 index 05ae79709..000000000 --- a/Client/src/Pages/Monitors/monitors.css +++ /dev/null @@ -1,100 +0,0 @@ -.current-monitors { - margin-top: var(--env-var-spacing-2); - border: 1px solid #eaecf0; - padding: 40px; - border-radius: 4px; -} - -.current-monitors-title-holder { - display: flex; - align-items: center; -} - -.current-monitors-bar { - display: flex; - justify-content: space-between; -} - -.current-monitors-title { - font-size: 1rem; - font-weight: bold; - margin-right: var(--env-var-spacing-1); - color: var(--env-var-color-1); -} - -.current-monitors-counter { - display: inline-flex; - justify-content: center; - align-items: center; - padding: 2px; - min-width: 22px; - min-height: 22px; - background-color: var(--env-var-color-15); - border: 1px solid var(--env-var-color-6); - border-radius: 50%; - font-size: var(--env-var-font-size-medium); - font-weight: 500; - color: var(--env-var-color-5); -} - -.monitors-v-gaping { - height: var(--env-var-spacing-3); -} - -.current-monitors-table { - width: 100%; - text-align: left; -} - -.current-monitors-table { - width: 100%; - text-align: left; - border-collapse: collapse; - border: 1px solid var(--env-var-color-16); - border-radius: var(--env-var-radius-1); -} - -.current-monitors-table th, -.current-monitors-table td { - border: 1px solid var(--env-var-color-16); - border-left: none; - border-right: none; - padding: 8px; -} - -.theader-row { - background-color: var(--env-var-color-13); - color: var(--env-var-color-2); - font-weight: 500; -} - -.theader-row td { - padding: var(--env-var-spacing-1) var(--env-var-spacing-2); - font-size: var(--env-var-font-size-medium); -} - -.host-list-item-precentage { - font-size: var(--env-var-font-size-medium); -} - -.tbody-row td { - padding: var(--env-var-spacing-2) var(--env-var-img-width-2); -} - -.host-status-box { - display: flex; - width: fit-content; - border: 1px solid var(--env-var-color-4); - border-radius: var(--env-var-radius-2); - align-items: center; - padding: calc(var(--env-var-spacing-1) / 2); -} - -.host-actions { - margin: auto; - cursor: pointer; -} - -.tbody-row-cell.actions-cell { - padding-left: 30px; -} diff --git a/Client/src/Pages/NewPasswordConfirmed/index.css b/Client/src/Pages/NewPasswordConfirmed/index.css deleted file mode 100644 index aae2d8636..000000000 --- a/Client/src/Pages/NewPasswordConfirmed/index.css +++ /dev/null @@ -1,36 +0,0 @@ -.password-confirmed-page { - display: flex; - justify-content: center; - height: var(--env-var-height-1); -} -.password-confirmed-page button:not(.MuiIconButton-root) { - height: 34px; - border-radius: var(--env-var-radius-2); - line-height: 0; -} -.password-confirmed-page h1.MuiTypography-root { - font-size: var(--env-var-font-size-large); - color: var(--env-var-color-1); - font-weight: 600; -} -.password-confirmed-page p.MuiTypography-root, -.password-confirmed-page button { - font-size: var(--env-var-font-size-medium); -} -.password-confirmed-page p.MuiTypography-root { - color: var(--env-var-color-2); -} -.password-confirmed-page button:not(.MuiIconButton-root) svg { - margin-right: 5px; -} -.password-confirmed-page - .MuiFormControl-root:has(#register-password-input) - + span.MuiTypography-root { - display: none; - visibility: hidden; -} - -.password-confirmed-form { - margin-top: 65px; - width: var(--env-var-width-2); -} diff --git a/Client/src/Pages/Register/index.css b/Client/src/Pages/Register/index.css deleted file mode 100644 index b3e7c8a89..000000000 --- a/Client/src/Pages/Register/index.css +++ /dev/null @@ -1,38 +0,0 @@ -.register-page { - display: flex; - justify-content: center; - height: var(--env-var-height-1); -} -.register-page h1.MuiTypography-root { - font-size: var(--env-var-font-size-large); - color: var(--env-var-color-1); - font-weight: 600; - opacity: 0.5; -} -.register-page p.MuiTypography-root, -.register-page span, -.register-page button { - font-size: var(--env-var-font-size-medium); -} -.register-page p.MuiTypography-root { - color: var(--env-var-color-2); - opacity: 0.8; -} -.register-page button:not(.MuiIconButton-root) { - height: 34px; - border-radius: var(--env-var-radius-2); - line-height: 0; -} -.register-page svg rect { - fill: none; -} -.register-page - .MuiFormControl-root:has(#register-password-input) - + span.MuiTypography-root { - display: none; - visibility: hidden; -} - -.register-form { - margin-top: 95px; -} diff --git a/Client/src/Pages/SetNewPassword/index.css b/Client/src/Pages/SetNewPassword/index.css deleted file mode 100644 index db7160d85..000000000 --- a/Client/src/Pages/SetNewPassword/index.css +++ /dev/null @@ -1,36 +0,0 @@ -.set-new-password-page { - display: flex; - justify-content: center; - height: var(--env-var-height-1); -} -.set-new-password-page button:not(.MuiIconButton-root) { - height: 34px; - border-radius: var(--env-var-radius-2); - line-height: 0; -} -.set-new-password-page h1.MuiTypography-root { - font-size: var(--env-var-font-size-large); - color: var(--env-var-color-1); - font-weight: 600; -} -.set-new-password-page p.MuiTypography-root, -.set-new-password-page button { - font-size: var(--env-var-font-size-medium); -} -.set-new-password-page p.MuiTypography-root { - color: var(--env-var-color-2); -} -.set-new-password-page button:not(.MuiIconButton-root) svg { - margin-right: 5px; -} -.set-new-password-page - .MuiFormControl-root:has(#register-password-input) - + span.MuiTypography-root { - display: none; - visibility: hidden; -} - -.set-new-password-form { - margin-top: 65px; - width: var(--env-var-width-2); -} From a7a4a676840371e829842c01a17084734fccee87 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Wed, 17 Jul 2024 20:33:33 -0400 Subject: [PATCH 2/6] Anchor tag noreferrer --- Client/src/Pages/Monitors/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/Monitors/index.jsx b/Client/src/Pages/Monitors/index.jsx index dd18df888..e08e973e1 100644 --- a/Client/src/Pages/Monitors/index.jsx +++ b/Client/src/Pages/Monitors/index.jsx @@ -27,7 +27,7 @@ import ResponseTimeChart from "../../Components/Charts/ResponseTimeChart"; const Host = ({ params }) => { return (
- +
{params.title}
From 36a55f189c3a6c11b5ce370522fc313d8d2aa8b9 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 17 Jul 2024 19:23:25 -0700 Subject: [PATCH 3/6] Deleted demo page, no longer needed --- Client/src/Pages/Demo/Demo.css | 0 Client/src/Pages/Demo/Demo.jsx | 517 --------------------------------- 2 files changed, 517 deletions(-) delete mode 100644 Client/src/Pages/Demo/Demo.css delete mode 100644 Client/src/Pages/Demo/Demo.jsx diff --git a/Client/src/Pages/Demo/Demo.css b/Client/src/Pages/Demo/Demo.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/Client/src/Pages/Demo/Demo.jsx b/Client/src/Pages/Demo/Demo.jsx deleted file mode 100644 index 441eff7e9..000000000 --- a/Client/src/Pages/Demo/Demo.jsx +++ /dev/null @@ -1,517 +0,0 @@ -import React, { useState } from "react"; -import Button from "../../Components/Button/"; -import ButtonSpinner from "../../Components/ButtonSpinner"; -import Link from "../../Components/Link"; -import { - useTheme, - Switch, - Checkbox, - FormControl, - FormLabel, - FormControlLabel, - Radio, - RadioGroup, - Tab, - Tabs, - Typography, - Stack, - Box, -} from "@mui/material"; -import { ColoredLabel, StatusLabel } from "../../Components/Label/"; -import Avatar from "../../Components/Avatar/"; -import ProgressStepper from "../../Components/ProgressStepper"; -import avatarImage from "../../assets/Images/avatar_placeholder.png"; -import { DataGrid } from "@mui/x-data-grid"; -import { DatePicker } from "@mui/x-date-pickers/DatePicker"; -import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; -import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; -import AddIcon from "@mui/icons-material/Add"; -import Divider from "@mui/material/Divider"; -import UploadIcon from "@mui/icons-material/Upload"; -import SendIcon from "@mui/icons-material/Send"; -import ImageIcon from "@mui/icons-material/Image"; - -// Redux -import { useSelector } from "react-redux"; -import { useDispatch } from "react-redux"; -import { getMonitors } from "../../Features/Monitors/monitorsSlice"; -import { getMonitorsByUserId } from "../../Features/Monitors/monitorsSlice"; -import ImageField from "../../Components/Inputs/Image"; -import ProgressUpload from "../../Components/ProgressBars"; -import Alert from "../../Components/Alert"; -import { createToast } from "../../Utils/toastUtils"; -import Field from "../../Components/Inputs/Field"; - -const cols = [ - { - field: "name", - headerName: "Name", - renderCell: (params) => { - return ( -
- -
- {params.value.firstName} {params.value.lastName} -
-
- ); - }, - flex: 1, - }, - { - field: "status", - headerName: "Status", - renderCell: (params) => { - return ; - }, - flex: 1, - }, - { field: "role", headerName: "Role", flex: 1 }, - { field: "team", headerName: "Team", flex: 1 }, - { field: "hireDate", headerName: "Hire date", flex: 1 }, -]; - -const rows = ((count) => { - const arr = []; - for (let i = 0; i < count; i++) { - let row = { - id: i, - name: { - avatarImage: i % 2 === 0 ? avatarImage : null, - firstName: "Placeholder Name", - lastName: i.toString(), - }, - status: "Active", - role: "Product Designer", - team: "Marketing", - hireDate: new Date().toLocaleDateString(), - }; - arr.push(row); - } - return arr; -})(100); - -const steps = [ - { label: "Your details", content: "Please provide your name and email" }, - { label: "Company details", content: "A few details about your company" }, - { label: "Invite your team", content: "Start collaborating with your team" }, -]; - -const demoMonitors = [ - { id: 0, name: "Google", isActive: true }, - { id: 1, name: "Yahoo", isActive: false }, - { id: 2, name: "Reddit", isActive: true }, -]; - -const Demo = () => { - const dispatch = useDispatch(); - - const [radio, setRadio] = React.useState(1); - const [tab, setTab] = React.useState("departments"); - const [date, setDate] = React.useState("Pick a date!"); - - const handleRadio = (event) => { - setRadio(event.target.value); - }; - - const handleTab = (event, newValue) => { - setTab(newValue); - }; - - const handleDate = (newValue) => { - setDate(newValue.toString()); - }; - - const change = (event, type) => { - alert(event.target.checked ? `${type} checked` : `${type} unchecked`); - }; - - const links = [ - { - name: "Buttons", - url: "#buttons", - }, - { - name: "Disabled Buttons", - url: "#disabled-buttons", - }, - { - name: "Labels", - url: "#labels", - }, - { - name: "Status Labels", - url: "#status-labels", - }, - { - name: "Avatar", - url: "#avatar", - }, - { - name: "Switches", - url: "#switches", - }, - { - name: "Checkboxes", - url: "#checkboxes", - }, - { - name: "Radio", - url: "#radio", - }, - { - name: "Table", - url: "#table", - }, - { - name: "Tabs", - url: "#tabs", - }, - { - name: "Date Picker", - url: "#date-picker", - }, - { - name: "Stepper", - url: "#stepper", - }, - { - name: "Section", - url: "#section", - }, - ]; - - const theme = useTheme(); - - // ********************************* - // Redux Demo - // ********************************* - const monitorState = useSelector((state) => state.monitors); - const { monitors, msg } = monitorState; - - //Button Spinner state - const [isLoading, setIsLoading] = useState(false); - const handleButtonSpinnerClick = () => { - setIsLoading(true); - - setTimeout(() => { - setIsLoading(false); - }, 4000); - }; - - return ( -
-
- Redux Demo - Monitors - - - - - - - {monitors && - monitors.map((monitor) => { - return ( - - - - - ); - })} - -
NameURL
- {monitor.name} - {monitor.url}
-

Message: {msg}

-
-
    - {links.map((link) => ( -
  • - -
  • - ))} -
- -

Buttons

-
-
- -

Disabled Buttons

-
-
-
- -
- -

Labels

-
- - - - -
- -

Status Lables

-
- - - - - -
- -

Avatar

-
- - - - -
- -

Switches

-
- change(event, "Switch")} /> - - - -
- -

Checkboxes

-
- change(event, "Checkbox")} /> - - - -
- -

Radio

-
- - Demo Radio - -
- } label="1" /> - } label="2" /> - } - label="3" - /> - } - label="4" - /> -
-
-
-
- -

Table

-
- -
- -

Tabs

-
- {" "} - - - - - - -
- -

Date Picker

-
- - - -

{date}

-
- -

Stepper

-
- -
- -

Loading Buttons

- - - - - } - onClick={handleButtonSpinnerClick} - isLoading={isLoading} - /> - } - onClick={handleButtonSpinnerClick} - isLoading={isLoading} - /> - - - - - console.log("changed")} - /> - - - - } - label="image.jpg" - size="2 MB" - progress={50} - onClick={() => console.log("click")} - /> - - - - - - - - - - - - - - - - - - - -
- ); -}; -export default Demo; From c9694ed00be4004d0e78e6c76e32c9c4e4f920a3 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 17 Jul 2024 19:24:03 -0700 Subject: [PATCH 4/6] Removed demo route --- Client/src/App.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Client/src/App.jsx b/Client/src/App.jsx index 8c1250f13..bf23fb663 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -4,7 +4,6 @@ import NotFound from "./Pages/NotFound"; import Login from "./Pages/Auth/Login"; import Register from "./Pages/Auth/Register"; import HomeLayout from "./Layouts/HomeLayout"; -import Demo from "./Pages/Demo/Demo"; import PlayGround from "./Pages/PlayGround/PlayGround"; import Account from "./Pages/Account"; import Monitors from "./Pages/Monitors"; @@ -82,7 +81,6 @@ function App() { } /> } /> - } /> {/* } /> */} } /> } /> From 0560046686e814b94bfbf98ea58013cdcb88d6f4 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 17 Jul 2024 19:24:57 -0700 Subject: [PATCH 5/6] Removed playground, prepare for release --- .../Pages/PlayGround/PlayGround-Charts.jsx | 25 ------ .../Pages/PlayGround/PlayGround-Tooltips.jsx | 34 -------- .../PlayGround/PlayGround-announcements.jsx | 73 ---------------- Client/src/Pages/PlayGround/PlayGround.jsx | 86 ------------------- Client/src/Pages/PlayGround/playGround.css | 19 ---- 5 files changed, 237 deletions(-) delete mode 100644 Client/src/Pages/PlayGround/PlayGround-Charts.jsx delete mode 100644 Client/src/Pages/PlayGround/PlayGround-Tooltips.jsx delete mode 100644 Client/src/Pages/PlayGround/PlayGround-announcements.jsx delete mode 100644 Client/src/Pages/PlayGround/PlayGround.jsx delete mode 100644 Client/src/Pages/PlayGround/playGround.css diff --git a/Client/src/Pages/PlayGround/PlayGround-Charts.jsx b/Client/src/Pages/PlayGround/PlayGround-Charts.jsx deleted file mode 100644 index 906f2a84a..000000000 --- a/Client/src/Pages/PlayGround/PlayGround-Charts.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; -import "./playGround.css"; -import Statistic from "../../Components/Charts/Statistics/Statistic"; -import ServerStatus from "../../Components/Charts/Servers/ServerStatus"; - -function PlayGroundCharts() { - return ( - <> -
- - - - -
-
-
- - - -
- - ); -} - -export default PlayGroundCharts; diff --git a/Client/src/Pages/PlayGround/PlayGround-Tooltips.jsx b/Client/src/Pages/PlayGround/PlayGround-Tooltips.jsx deleted file mode 100644 index 3713f889c..000000000 --- a/Client/src/Pages/PlayGround/PlayGround-Tooltips.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import TooltipWithTail from "../../Components/Tooltips/TooltipWithTail/TooltipWithTail"; -import "./playGround.css"; - -function PlayGroundTooltips() { - return ( -
-
- -
- -
- -
- -
- ); -} - -export default PlayGroundTooltips; diff --git a/Client/src/Pages/PlayGround/PlayGround-announcements.jsx b/Client/src/Pages/PlayGround/PlayGround-announcements.jsx deleted file mode 100644 index aa4bd1913..000000000 --- a/Client/src/Pages/PlayGround/PlayGround-announcements.jsx +++ /dev/null @@ -1,73 +0,0 @@ -import "./playGround.css"; -import React from "react"; -import AnnouncementsDualButtonWithIcon from "../../Components/Announcements/AnnouncementsDualButtonWithIcon/AnnouncementsDualButtonWithIcon"; -import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined"; -import ComplexAlert from "../../Components/Icons/ComplexAlert/ComplexAlert"; -import AnnouncementsMessageBar from "../../Components/Announcements/AnnouncementsMessageBar/AnnouncementsMessageBar"; -import AnnouncementsDualButton from "../../Components/Announcements/AnnouncementsDualButton/AnnouncementsDualButton"; -import AnnouncementUpdateSubscription from "../../Components/Announcements/AnnouncementUpdateSubscription/AnnouncementUpdateSubscription"; - -function PlayGroundAnnouncements() { - return ( -
- - -
- } - subject="We’ve just released a new feature" - body="Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid - pariatur, ipsum dolor." - esc="Dismiss" - primary="View changes" - /> -
-
- } - subject="There was a problem with that action" - body="Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid - pariatur, ipsum dolor." - esc="Dismiss" - primary="Learn more" - /> -
-
- } - subject="Successfully updated profile" - body="Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid - pariatur, ipsum dolor." - esc="Dismiss" - primary="Learn more" - /> -
-
- -
-
- -
-
- -
-
-
- ); -} - -export default PlayGroundAnnouncements; diff --git a/Client/src/Pages/PlayGround/PlayGround.jsx b/Client/src/Pages/PlayGround/PlayGround.jsx deleted file mode 100644 index 42f58148e..000000000 --- a/Client/src/Pages/PlayGround/PlayGround.jsx +++ /dev/null @@ -1,86 +0,0 @@ -import React from "react"; -import PlayGroundCharts from "./PlayGround-Charts"; -import PlayGroundTooltips from "./PlayGround-Tooltips"; -import Field from "../../Components/Inputs/Field"; - -// This Component is just for the development and test -// purposes and just to see what my components look like while development -// and will be removed in the end -function PlayGround() { - return ( -
- {/* Default state of Email Text Fields */} -
- - {/* Email Text Field when validation error occures */} - -
- -
- - {/* Now, illustration of the Website text fields */} -
- - -
- -
- {/* Now, illustration of the Description text fields */} - -
- - -
-
- -
- -
- ); -} - -export default PlayGround; diff --git a/Client/src/Pages/PlayGround/playGround.css b/Client/src/Pages/PlayGround/playGround.css deleted file mode 100644 index cd6d5e87b..000000000 --- a/Client/src/Pages/PlayGround/playGround.css +++ /dev/null @@ -1,19 +0,0 @@ -.play-ground-charts { - display: flex; -} - -.play-ground-charts-spacing { - height: 110px; -} - -.tooltip-playground { - margin: auto; - padding: 5%; - width: 5%; - justify-content: center; - text-align: center; -} - -.playground { - padding: 40px; -} From 3576fcd740d78d2e233ecc9e806534872c68ed07 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 17 Jul 2024 19:26:08 -0700 Subject: [PATCH 6/6] Removed playground route --- Client/src/App.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Client/src/App.jsx b/Client/src/App.jsx index bf23fb663..0482aec5d 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -4,7 +4,6 @@ import NotFound from "./Pages/NotFound"; import Login from "./Pages/Auth/Login"; import Register from "./Pages/Auth/Register"; import HomeLayout from "./Layouts/HomeLayout"; -import PlayGround from "./Pages/PlayGround/PlayGround"; import Account from "./Pages/Account"; import Monitors from "./Pages/Monitors"; import CreateMonitor from "./Pages/Monitors/CreateMonitor"; @@ -83,7 +82,6 @@ function App() { } /> {/* } /> */} } /> - } /> } /> } /> } />