From f148e2d9ad9bf49b2b8f0d60789de48ab1f5ff8f Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 6 Dec 2024 14:25:11 +0800 Subject: [PATCH 01/62] Refactor Create PageSpeed --- .../Pages/PageSpeed/CreatePageSpeed/index.jsx | 313 ++++++++---------- 1 file changed, 142 insertions(+), 171 deletions(-) diff --git a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx index ba3a7bb4a..6823cfe21 100644 --- a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx @@ -1,42 +1,52 @@ +// React, Redux, Router +import { useNavigate, useParams } from "react-router-dom"; +import { useEffect } from "react"; import { useState } from "react"; -import { Box, Button, ButtonGroup, Stack, Typography } from "@mui/material"; -import LoadingButton from "@mui/lab/LoadingButton"; import { useSelector, useDispatch } from "react-redux"; + +// Utility and Network +import { logger } from "../../../Utils/Logger"; import { monitorValidation } from "../../../Validation/validation"; -import { useNavigate } from "react-router-dom"; -import { useTheme } from "@emotion/react"; import { createPageSpeed, checkEndpointResolution, } from "../../../Features/PageSpeedMonitor/pageSpeedMonitorSlice"; -import { createToast } from "../../../Utils/toastUtils"; -import { logger } from "../../../Utils/Logger"; -import { ConfigBox } from "../../Monitors/styled"; -import Radio from "../../../Components/Inputs/Radio"; +import { parseDomainName } from "../../../Utils/monitorUtils"; + +// MUI +import { useTheme } from "@emotion/react"; +import { Box, Stack, Typography, Button, ButtonGroup } from "@mui/material"; +import LoadingButton from "@mui/lab/LoadingButton"; + +//Components +import Breadcrumbs from "../../../Components/Breadcrumbs"; import TextInput from "../../../Components/Inputs/TextInput"; import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments"; -import Select from "../../../Components/Inputs/Select"; +import { ConfigBox } from "../../Monitors/styled"; + +import { createToast } from "../../../Utils/toastUtils"; +import Radio from "../../../Components/Inputs/Radio"; import Checkbox from "../../../Components/Inputs/Checkbox"; -import Breadcrumbs from "../../../Components/Breadcrumbs"; -import { parseDomainName } from "../../../Utils/monitorUtils"; -import "./index.css"; +import Select from "../../../Components/Inputs/Select"; const CreatePageSpeed = () => { const MS_PER_MINUTE = 60000; - const { user, authToken } = useSelector((state) => state.auth); - const { isLoading } = useSelector((state) => state.pageSpeedMonitors); - const dispatch = useDispatch(); - const navigate = useNavigate(); - const theme = useTheme(); - const idMap = { - "monitor-url": "url", - "monitor-name": "name", - "monitor-checks-http": "type", - "monitor-checks-ping": "type", - "notify-email-default": "notification-email", - }; + const CRUMBS = [ + { name: "pagespeed", path: "/pagespeed" }, + { name: "create", path: `/pagespeed/create` }, + ]; + const SELECT_VALUES = [ + { _id: 3, name: "3 minutes" }, + { _id: 5, name: "5 minutes" }, + { _id: 10, name: "10 minutes" }, + { _id: 20, name: "20 minutes" }, + { _id: 60, name: "1 hour" }, + { _id: 1440, name: "1 day" }, + { _id: 10080, name: "1 week" }, + ]; + // State const [monitor, setMonitor] = useState({ url: "", name: "", @@ -44,71 +54,20 @@ const CreatePageSpeed = () => { notifications: [], interval: 3, }); + const [https, setHttps] = useState(true); const [errors, setErrors] = useState({}); + const { user, authToken } = useSelector((state) => state.auth); + const { isLoading } = useSelector((state) => state.pageSpeedMonitors); - const handleChange = (event, name) => { - const { value, id } = event.target; - if (!name) name = idMap[id]; - - if (name.includes("notification-")) { - name = name.replace("notification-", ""); - let hasNotif = monitor.notifications.some( - (notification) => notification.type === name - ); - setMonitor((prev) => { - const notifs = [...prev.notifications]; - if (hasNotif) { - return { - ...prev, - notifications: notifs.filter((notif) => notif.type !== name), - }; - } else { - return { - ...prev, - notifications: [ - ...notifs, - name === "email" - ? { type: name, address: value } - : // TODO - phone number - { type: name, phone: value }, - ], - }; - } - }); - } else { - setMonitor((prev) => ({ - ...prev, - [name]: value, - })); - - const { error } = monitorValidation.validate( - { [name]: value }, - { abortEarly: false } - ); - - setErrors((prev) => { - const updatedErrors = { ...prev }; - if (error) updatedErrors[name] = error.details[0].message; - else delete updatedErrors[name]; - return updatedErrors; - }); - } - }; - - const onUrlBlur = (event) => { - const { value } = event.target; - if (monitor.name === "") { - setMonitor((prev) => ({ - ...prev, - name: parseDomainName(value), - })); - } - }; + // Setup + const dispatch = useDispatch(); + const navigate = useNavigate(); + const theme = useTheme(); + // Handlers const handleCreateMonitor = async (event) => { event.preventDefault(); - //obj to submit let form = { url: `http${https ? "s" : ""}://` + monitor.url, name: monitor.name === "" ? monitor.url : monitor.name, @@ -126,46 +85,98 @@ const CreatePageSpeed = () => { newErrors[err.path[0]] = err.message; }); setErrors(newErrors); - createToast({ body: "Error validation data." }); - } else { - const checkEndpointAction = await dispatch( - checkEndpointResolution({ authToken, monitorURL: form.url }) - ); - if (checkEndpointAction.meta.requestStatus === "rejected") { - createToast({ - body: "The endpoint you entered doesn't resolve. Check the URL again.", - }); - setErrors({ url: "The entered URL is not reachable." }); - return; - } + createToast({ body: "Please check the form for errors." }); + return; + } - form = { - ...form, - description: form.name, - teamId: user.teamId, - userId: user._id, - notifications: monitor.notifications, - }; - const action = await dispatch(createPageSpeed({ authToken, monitor: form })); - if (action.meta.requestStatus === "fulfilled") { - createToast({ body: "Monitor created successfully!" }); - navigate("/pagespeed"); - } else { - createToast({ body: "Failed to create monitor." }); - } + const checkEndpointAction = await dispatch( + checkEndpointResolution({ authToken, monitorURL: form.url }) + ); + + if (checkEndpointAction.meta.requestStatus === "rejected") { + createToast({ + body: "The endpoint you entered doesn't resolve. Check the URL again.", + }); + setErrors({ url: "The entered URL is not reachable." }); + return; + } + + form = { + ...form, + description: form.name, + teamId: user.teamId, + userId: user._id, + notifications: monitor.notifications, + }; + + const action = await dispatch(createPageSpeed({ authToken, monitor: form })); + if (action.meta.requestStatus === "fulfilled") { + createToast({ body: "Monitor created successfully!" }); + navigate("/pagespeed"); + } else { + createToast({ body: "Failed to create monitor." }); + } + }; + + const handleChange = (event, formItemName) => { + const { value } = event.target; + setMonitor({ + ...monitor, + [formItemName]: value, + }); + + const { error } = monitorValidation.validate( + { [formItemName]: value }, + { abortEarly: false } + ); + + setErrors((prev) => ({ + ...prev, + ...(error + ? { [formItemName]: error.details[0].message } + : { [formItemName]: undefined }), + })); + }; + + const handleNotifications = (event, type) => { + const { value } = event.target; + let notifications = [...monitor.notifications]; + const notificationExists = notifications.some((notification) => { + if (notification.type === type && notification.address === value) { + return true; + } + return false; + }); + if (notificationExists) { + notifications = notifications.filter((notification) => { + if (notification.type === type && notification.address === value) { + return false; + } + return true; + }); + } else { + notifications.push({ type, address: value }); + } + + setMonitor((prev) => ({ + ...prev, + notifications, + })); + }; + + const handleBlur = (event, formItemName) => { + if (formItemName === "url") { + const { value } = event.target; + if (monitor.name !== "") { + return; + } + setMonitor((prev) => ({ + ...prev, + name: parseDomainName(value), + })); } }; - //select values - const frequencies = [ - { _id: 3, name: "3 minutes" }, - { _id: 5, name: "5 minutes" }, - { _id: 10, name: "10 minutes" }, - { _id: 20, name: "20 minutes" }, - { _id: 60, name: "1 hour" }, - { _id: 1440, name: "1 day" }, - { _id: 10080, name: "1 week" }, - ]; return ( { }, }} > - + { fontWeight="inherit" color={theme.palette.text.secondary} > - pagespeed monitor + PageSpeed monitor @@ -224,8 +230,8 @@ const CreatePageSpeed = () => { startAdornment={} placeholder="google.com" value={monitor.url} - onChange={handleChange} - onBlur={onUrlBlur} + onChange={(event) => handleChange(event, "url")} + onBlur={(event) => handleBlur(event, "url")} error={errors["url"] ? true : false} helperText={errors["url"]} /> @@ -236,7 +242,7 @@ const CreatePageSpeed = () => { isOptional={true} placeholder="Google" value={monitor.name} - onChange={handleChange} + onChange={(event) => handleChange(event, "name")} error={errors["name"] ? true : false} helperText={errors["name"]} /> @@ -253,8 +259,8 @@ const CreatePageSpeed = () => { { HTTPS + + + { placeholder="Google" isOptional={true} value={infrastructureMonitor.name} - onBlur={handleBlur} - onChange={handleChange} + onChange={(event) => handleChange(event, "name")} error={errors["name"]} /> { id="secret" label="Authorization secret" value={infrastructureMonitor.secret} - onBlur={handleBlur} - onChange={handleChange} + onChange={(event) => handleChange(event, "secret")} error={errors["secret"] ? true : false} helperText={errors["secret"]} /> @@ -311,12 +342,11 @@ const CreateInfrastructureMonitor = () => { (notification) => notification.type === "email" )} value={user?.email} - onChange={(e) => handleChange(e)} + onChange={(event) => handleNotifications(event, "email")} onBlur={handleBlur} /> - Customize alerts @@ -326,25 +356,30 @@ const CreateInfrastructureMonitor = () => { - {HARDWARE_MONITOR_TYPES.map((type, idx) => ( - - ))} - {alertErrKeyLen > 0 && ( + {METRICS.map((metric) => { + return ( + handleCheckboxChange(event, metric)} + isChecked={infrastructureMonitor[metric]} + fieldId={METRIC_PREFIX + metric} + fieldValue={infrastructureMonitor[METRIC_PREFIX + metric]} + onFieldChange={(event) => handleChange(event, METRIC_PREFIX + metric)} + onFieldBlur={(event) => handleBlur(event, METRIC_PREFIX + metric)} + alertUnit={metric == "temperature" ? "°C" : "%"} + /> + ); + })} + {/* Error text */} + {hasAlertError(errors) && ( { opacity: 0.8, }} > - { - errors[ - THRESHOLD_FIELD_PREFIX + - HARDWARE_MONITOR_TYPES.filter( - (type) => errors[THRESHOLD_FIELD_PREFIX + type] - )[0] - ] - } + {getAlertError(errors)} )} @@ -377,7 +405,7 @@ const CreateInfrastructureMonitor = () => { value={infrastructureMonitor.interval || 15} onChange={(e) => handleChange(e, "interval")} onBlur={(e) => handleBlur(e, "interval")} - items={frequencies} + items={SELECT_VALUES} /> From f42bdddb7a5a87dad284533f609827ce402645ac Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 9 Dec 2024 14:01:10 +0800 Subject: [PATCH 05/62] add deleteHardwareChecksByMonitorId --- Server/controllers/monitorController.js | 1 + Server/db/mongo/MongoDB.js | 6 +++++- Server/db/mongo/modules/hardwareCheckModule.js | 14 +++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Server/controllers/monitorController.js b/Server/controllers/monitorController.js index 0866017bf..625c1a0f7 100644 --- a/Server/controllers/monitorController.js +++ b/Server/controllers/monitorController.js @@ -332,6 +332,7 @@ const deleteMonitor = async (req, res, next) => { await req.db.deleteChecks(monitor._id); await req.db.deletePageSpeedChecksByMonitorId(monitor._id); await req.db.deleteNotificationsByMonitorId(monitor._id); + await req.db.deleteHardwareChecksByMonitorId(monitor._id); } catch (error) { logger.error({ message: `Error deleting associated records for monitor ${monitor._id} with name ${monitor.name}`, diff --git a/Server/db/mongo/MongoDB.js b/Server/db/mongo/MongoDB.js index 288aa83ad..3bdde7d69 100644 --- a/Server/db/mongo/MongoDB.js +++ b/Server/db/mongo/MongoDB.js @@ -124,7 +124,10 @@ import { //**************************************** // Hardware Checks //**************************************** -import { createHardwareCheck } from "./modules/hardwareCheckModule.js"; +import { + createHardwareCheck, + deleteHardwareChecksByMonitorId, +} from "./modules/hardwareCheckModule.js"; //**************************************** // Checks @@ -213,6 +216,7 @@ export default { createPageSpeedCheck, deletePageSpeedChecksByMonitorId, createHardwareCheck, + deleteHardwareChecksByMonitorId, createMaintenanceWindow, getMaintenanceWindowsByTeamId, getMaintenanceWindowById, diff --git a/Server/db/mongo/modules/hardwareCheckModule.js b/Server/db/mongo/modules/hardwareCheckModule.js index 3eab0dfb9..9c49e831b 100644 --- a/Server/db/mongo/modules/hardwareCheckModule.js +++ b/Server/db/mongo/modules/hardwareCheckModule.js @@ -37,4 +37,16 @@ const createHardwareCheck = async (hardwareCheckData) => { } }; -export { createHardwareCheck }; +const deleteHardwareChecksByMonitorId = async (monitorId) => { + try { + const result = await HardwareCheck.deleteMany({ monitorId }); + console.log("deleted hardware checks", result); + return result.deletedCount; + } catch (error) { + error.service = SERVICE_NAME; + error.method = "deleteHardwareChecksByMonitorId"; + throw error; + } +}; + +export { createHardwareCheck, deleteHardwareChecksByMonitorId }; From b306a4ac7b97c9adede6501775d51b99753beba4 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 10 Dec 2024 11:17:17 +0800 Subject: [PATCH 06/62] Add name to all inputs, use event.target.name instead of passing extra variable --- .../Pages/PageSpeed/CreatePageSpeed/index.jsx | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx index 6823cfe21..ccab3442f 100644 --- a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx @@ -1,11 +1,9 @@ // React, Redux, Router -import { useNavigate, useParams } from "react-router-dom"; -import { useEffect } from "react"; +import { useNavigate } from "react-router-dom"; import { useState } from "react"; import { useSelector, useDispatch } from "react-redux"; // Utility and Network -import { logger } from "../../../Utils/Logger"; import { monitorValidation } from "../../../Validation/validation"; import { createPageSpeed, @@ -29,23 +27,24 @@ import Radio from "../../../Components/Inputs/Radio"; import Checkbox from "../../../Components/Inputs/Checkbox"; import Select from "../../../Components/Inputs/Select"; +const MS_PER_MINUTE = 60000; + +const CRUMBS = [ + { name: "pagespeed", path: "/pagespeed" }, + { name: "create", path: `/pagespeed/create` }, +]; + +const SELECT_VALUES = [ + { _id: 3, name: "3 minutes" }, + { _id: 5, name: "5 minutes" }, + { _id: 10, name: "10 minutes" }, + { _id: 20, name: "20 minutes" }, + { _id: 60, name: "1 hour" }, + { _id: 1440, name: "1 day" }, + { _id: 10080, name: "1 week" }, +]; + const CreatePageSpeed = () => { - const MS_PER_MINUTE = 60000; - - const CRUMBS = [ - { name: "pagespeed", path: "/pagespeed" }, - { name: "create", path: `/pagespeed/create` }, - ]; - - const SELECT_VALUES = [ - { _id: 3, name: "3 minutes" }, - { _id: 5, name: "5 minutes" }, - { _id: 10, name: "10 minutes" }, - { _id: 20, name: "20 minutes" }, - { _id: 60, name: "1 hour" }, - { _id: 1440, name: "1 day" }, - { _id: 10080, name: "1 week" }, - ]; // State const [monitor, setMonitor] = useState({ url: "", @@ -118,23 +117,21 @@ const CreatePageSpeed = () => { } }; - const handleChange = (event, formItemName) => { - const { value } = event.target; + const handleChange = (event) => { + const { value, name } = event.target; setMonitor({ ...monitor, - [formItemName]: value, + [name]: value, }); const { error } = monitorValidation.validate( - { [formItemName]: value }, + { [name]: value }, { abortEarly: false } ); setErrors((prev) => ({ ...prev, - ...(error - ? { [formItemName]: error.details[0].message } - : { [formItemName]: undefined }), + ...(error ? { [name]: error.details[0].message } : { [name]: undefined }), })); }; @@ -164,8 +161,9 @@ const CreatePageSpeed = () => { })); }; - const handleBlur = (event, formItemName) => { - if (formItemName === "url") { + const handleBlur = (event) => { + const { name } = event.target; + if (name === "url") { const { value } = event.target; if (monitor.name !== "") { return; @@ -225,24 +223,26 @@ const CreatePageSpeed = () => { } placeholder="google.com" value={monitor.url} - onChange={(event) => handleChange(event, "url")} - onBlur={(event) => handleBlur(event, "url")} + onChange={handleChange} + onBlur={handleBlur} error={errors["url"] ? true : false} helperText={errors["url"]} /> handleChange(event, "name")} + onChange={handleChange} error={errors["name"] ? true : false} helperText={errors["name"]} /> @@ -264,7 +264,6 @@ const CreatePageSpeed = () => { size="small" value="http" checked={monitor.type === "pagespeed"} - onChange={(event) => handleChange(event)} /> )} + {noMonitors && } {loading ? ( @@ -77,20 +79,20 @@ const Monitors = ({ isAdmin }) => { > @@ -101,7 +103,7 @@ const Monitors = ({ isAdmin }) => { ); }; -Monitors.propTypes = { +UptimeMonitors.propTypes = { isAdmin: PropTypes.bool, }; -export default Monitors; +export default UptimeMonitors; diff --git a/Client/src/Pages/Monitors/Home/skeleton.jsx b/Client/src/Pages/Uptime/Home/skeleton.jsx similarity index 100% rename from Client/src/Pages/Monitors/Home/skeleton.jsx rename to Client/src/Pages/Uptime/Home/skeleton.jsx diff --git a/Client/src/Pages/Monitors/styled.jsx b/Client/src/Pages/Uptime/styled.jsx similarity index 100% rename from Client/src/Pages/Monitors/styled.jsx rename to Client/src/Pages/Uptime/styled.jsx diff --git a/Client/src/Pages/Monitors/utils.jsx b/Client/src/Pages/Uptime/utils.jsx similarity index 100% rename from Client/src/Pages/Monitors/utils.jsx rename to Client/src/Pages/Uptime/utils.jsx From 79dd781386ae8c96f5f9993b86a7ab5044f7b0ef Mon Sep 17 00:00:00 2001 From: Peter Carl Pardo Date: Wed, 11 Dec 2024 00:03:36 +0800 Subject: [PATCH 12/62] fix: update red palette colors --- Client/src/Utils/Theme/constants.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Client/src/Utils/Theme/constants.js b/Client/src/Utils/Theme/constants.js index df9b5da93..422648028 100644 --- a/Client/src/Utils/Theme/constants.js +++ b/Client/src/Utils/Theme/constants.js @@ -51,7 +51,8 @@ const paletteColors = { red50: "#F9ECED", red100: "#FBD1D1", red200: "#F04438", - red300: "#D32F2F", + red300: "#EBA8A9", + red400: "#D32F2F", red700: "#542426", red800: "#301A1F", orange50: "#FEF8EA", @@ -109,12 +110,12 @@ const semanticColors = { }, error: { main: { - light: paletteColors.red300, - dark: paletteColors.red300, + light: paletteColors.red400, + dark: paletteColors.red400, }, contrastText: { - light: paletteColors.gray50, - dark: paletteColors.gray50, + light: paletteColors.red300, + dark: paletteColors.red300, }, light: { light: paletteColors.red100, From d5acfd9e9ea2e5376bbe1eb84637d456b2c51378 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 11 Dec 2024 10:46:54 +0800 Subject: [PATCH 13/62] Add update trigger for pause state --- .../Pages/Monitors/Home/CurrentMonitoring/index.jsx | 4 +++- Client/src/Pages/Monitors/Home/MonitorTable/index.jsx | 8 +++++--- Client/src/Pages/Monitors/Home/actionsMenu.jsx | 7 ++++--- Client/src/Pages/Monitors/Home/index.jsx | 10 ++++++++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Client/src/Pages/Monitors/Home/CurrentMonitoring/index.jsx b/Client/src/Pages/Monitors/Home/CurrentMonitoring/index.jsx index a7f70d96e..151f47827 100644 --- a/Client/src/Pages/Monitors/Home/CurrentMonitoring/index.jsx +++ b/Client/src/Pages/Monitors/Home/CurrentMonitoring/index.jsx @@ -7,7 +7,7 @@ import useDebounce from "../../../../Utils/debounce"; import PropTypes from "prop-types"; import { Heading } from "../../../../Components/Heading"; -const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin }) => { +const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin, handlePause }) => { const theme = useTheme(); const [search, setSearch] = useState(""); const [isSearching, setIsSearching] = useState(false); @@ -55,12 +55,14 @@ const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin }) => { filter={debouncedFilter} setIsSearching={setIsSearching} isSearching={isSearching} + handlePause={handlePause} /> ); }; CurrentMonitoring.propTypes = { + handlePause: PropTypes.func, totalMonitors: PropTypes.number, monitors: PropTypes.array, isAdmin: PropTypes.bool, diff --git a/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx b/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx index 9a73bd543..b12a8d487 100644 --- a/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx +++ b/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx @@ -32,7 +32,7 @@ import ArrowUpwardRoundedIcon from "@mui/icons-material/ArrowUpwardRounded"; import { Pagination } from "../../../Infrastructure/components/TablePagination"; -const MonitorTable = ({ isAdmin, filter, setIsSearching, isSearching }) => { +const MonitorTable = ({ isAdmin, filter, setIsSearching, isSearching, handlePause }) => { const theme = useTheme(); const navigate = useNavigate(); const dispatch = useDispatch(); @@ -48,7 +48,7 @@ const MonitorTable = ({ isAdmin, filter, setIsSearching, isSearching }) => { const [sort, setSort] = useState({}); const prevFilter = useRef(filter); - const handleActionMenuDelete = () => { + const handleRowUpdate = () => { setUpdateTrigger((prev) => !prev); }; @@ -297,7 +297,8 @@ const MonitorTable = ({ isAdmin, filter, setIsSearching, isSearching }) => { @@ -325,6 +326,7 @@ MonitorTable.propTypes = { filter: PropTypes.string, setIsSearching: PropTypes.func, isSearching: PropTypes.bool, + setMonitorUpdateTrigger: PropTypes.func, }; const MemoizedMonitorTable = memo(MonitorTable); diff --git a/Client/src/Pages/Monitors/Home/actionsMenu.jsx b/Client/src/Pages/Monitors/Home/actionsMenu.jsx index f40092b11..e1be7fbf5 100644 --- a/Client/src/Pages/Monitors/Home/actionsMenu.jsx +++ b/Client/src/Pages/Monitors/Home/actionsMenu.jsx @@ -14,7 +14,7 @@ import Settings from "../../../assets/icons/settings-bold.svg?react"; import PropTypes from "prop-types"; import Dialog from "../../../Components/Dialog"; -const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => { +const ActionsMenu = ({ monitor, isAdmin, updateRowCallback, pauseCallback }) => { const [anchorEl, setAnchorEl] = useState(null); const [actions, setActions] = useState({}); const [isOpen, setIsOpen] = useState(false); @@ -47,9 +47,9 @@ const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => { 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.` }); + pauseCallback(); } else { throw new Error(action?.error?.message ?? "Failed to pause monitor."); } @@ -219,7 +219,8 @@ ActionsMenu.propTypes = { isActive: PropTypes.bool, }).isRequired, isAdmin: PropTypes.bool, - updateCallback: PropTypes.func, + updateRowCallback: PropTypes.func, + pauseCallback: PropTypes.func, }; export default ActionsMenu; diff --git a/Client/src/Pages/Monitors/Home/index.jsx b/Client/src/Pages/Monitors/Home/index.jsx index 345a0a88e..4c48bde3a 100644 --- a/Client/src/Pages/Monitors/Home/index.jsx +++ b/Client/src/Pages/Monitors/Home/index.jsx @@ -1,5 +1,5 @@ import "./index.css"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { useSelector, useDispatch } from "react-redux"; import { getUptimeMonitorsByTeamId } from "../../../Features/UptimeMonitors/uptimeMonitorsSlice"; import { useNavigate } from "react-router-dom"; @@ -19,10 +19,15 @@ const Monitors = ({ isAdmin }) => { const monitorState = useSelector((state) => state.uptimeMonitors); const authState = useSelector((state) => state.auth); const dispatch = useDispatch({}); + const [monitorUpdateTrigger, setMonitorUpdateTrigger] = useState(false); + + const handlePause = () => { + setMonitorUpdateTrigger((prev) => !prev); + }; useEffect(() => { dispatch(getUptimeMonitorsByTeamId(authState.authToken)); - }, [authState.authToken, dispatch]); + }, [authState.authToken, dispatch, monitorUpdateTrigger]); //TODO bring fetching to this component, like on pageSpeed @@ -92,6 +97,7 @@ const Monitors = ({ isAdmin }) => { isAdmin={isAdmin} monitors={monitorState.monitorsSummary.monitors} totalMonitors={totalMonitors} + handlePause={handlePause} /> )} From d9932774631cf06c2365877af01cdd84c2e699be Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 11 Dec 2024 11:00:50 +0800 Subject: [PATCH 14/62] Remove console log statement --- Client/src/Pages/Auth/Register/StepThree/index.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/Client/src/Pages/Auth/Register/StepThree/index.jsx b/Client/src/Pages/Auth/Register/StepThree/index.jsx index 760587b7b..4f565c528 100644 --- a/Client/src/Pages/Auth/Register/StepThree/index.jsx +++ b/Client/src/Pages/Auth/Register/StepThree/index.jsx @@ -31,7 +31,6 @@ function StepThree({ onSubmit, onBack }) { }, []); const { handleChange, feedbacks, form, errors } = useValidatePassword(); - console.log(errors); return ( <> Date: Wed, 11 Dec 2024 03:11:43 +0000 Subject: [PATCH 15/62] chore(deps): update dependency @types/react-dom to v18.3.5 --- Client/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/package-lock.json b/Client/package-lock.json index 135c3aab7..ee7e2d3b1 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -2370,9 +2370,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.4.tgz", - "integrity": "sha512-HMqjZ3RJxmfoOn3sVc0T0fO6qSrLDnUQYB+azHKdBBz1eOt0Sq4wUu2Sf1/Dt18gqhECg0fZ33tkh/6YdwrSCw==", + "version": "18.3.5", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.5.tgz", + "integrity": "sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==", "dev": true, "license": "MIT", "peerDependencies": { From c11726c920754b7474e673cd6a070a7e5ae5828d Mon Sep 17 00:00:00 2001 From: Indhu Date: Wed, 11 Dec 2024 15:03:43 +0530 Subject: [PATCH 16/62] Changed text from Usage --> usage in UI --- Client/src/Pages/Infrastructure/Details/index.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Client/src/Pages/Infrastructure/Details/index.jsx b/Client/src/Pages/Infrastructure/Details/index.jsx index 06fb1296a..7c5da5177 100644 --- a/Client/src/Pages/Infrastructure/Details/index.jsx +++ b/Client/src/Pages/Infrastructure/Details/index.jsx @@ -283,7 +283,7 @@ const InfrastructureDetails = () => { { type: "memory", value: decimalToPercentage(memoryUsagePercent), - heading: "Memory Usage", + heading: "Memory usage", metricOne: "Used", valueOne: formatBytes(memoryUsedBytes), metricTwo: "Total", @@ -292,7 +292,7 @@ const InfrastructureDetails = () => { { type: "cpu", value: decimalToPercentage(cpuUsagePercent), - heading: "CPU Usage", + heading: "CPU usage", metricOne: "Cores", valueOne: cpuPhysicalCores ?? 0, metricTwo: "Frequency", @@ -364,7 +364,7 @@ const InfrastructureDetails = () => { heading: "Memory usage", strokeColor: theme.palette.primary.main, gradientStartColor: theme.palette.primary.main, - yLabel: "Memory Usage", + yLabel: "Memory usage", yDomain: [0, 1], yTick: , xTick: , @@ -372,7 +372,7 @@ const InfrastructureDetails = () => { ), }, @@ -383,7 +383,7 @@ const InfrastructureDetails = () => { heading: "CPU usage", strokeColor: theme.palette.success.main, gradientStartColor: theme.palette.success.main, - yLabel: "CPU Usage", + yLabel: "CPU usage", yDomain: [0, 1], yTick: , xTick: , @@ -391,7 +391,7 @@ const InfrastructureDetails = () => { ), }, From 99c15438259d0998ab634a8a01bd71fbbba2aa54 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 11 Dec 2024 15:39:05 +0000 Subject: [PATCH 17/62] fix(deps): update material-ui monorepo --- Client/package-lock.json | 120 +++++++++++++++++++++------------------ Client/package.json | 6 +- 2 files changed, 69 insertions(+), 57 deletions(-) diff --git a/Client/package-lock.json b/Client/package-lock.json index 135c3aab7..12c8ef116 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -11,9 +11,9 @@ "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@fontsource/roboto": "^5.0.13", - "@mui/icons-material": "6.1.10", - "@mui/lab": "6.0.0-beta.18", - "@mui/material": "6.1.10", + "@mui/icons-material": "6.2.0", + "@mui/lab": "6.0.0-beta.19", + "@mui/material": "6.2.0", "@mui/x-charts": "^7.5.1", "@mui/x-data-grid": "7.23.1", "@mui/x-date-pickers": "7.23.1", @@ -1071,15 +1071,15 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-beta.64", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.64.tgz", - "integrity": "sha512-nu663PoZs/Pee0fkPYkjUADfT+AAi2QWvvHghDhLeSx8sa3i+GGaOoUsFmB4CPlyYqWfq9hRGA7H1T3d6VrGgw==", + "version": "5.0.0-beta.66", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.66.tgz", + "integrity": "sha512-1SzcNbtIms0o/Dx+599B6QbvR5qUMBUjwc2Gs47h1HsF7RcEFXxqaq7zrWkIWbvGctIIPx0j330oGx/SkF+UmA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", "@floating-ui/react-dom": "^2.1.1", "@mui/types": "^7.2.19", - "@mui/utils": "^6.1.10", + "@mui/utils": "^6.2.0", "@popperjs/core": "^2.11.8", "clsx": "^2.1.1", "prop-types": "^15.8.1" @@ -1092,9 +1092,9 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1103,9 +1103,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.1.10.tgz", - "integrity": "sha512-LY5wdiLCBDY7u+Od8UmFINZFGN/5ZU90fhAslf/ZtfP+5RhuY45f679pqYIxe0y54l6Gkv9PFOc8Cs10LDTBYg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.2.0.tgz", + "integrity": "sha512-Nn5PSkUqbDrvezpiiiYZiAbX4SFEiy3CbikUL6pWOXEUsq+L1j50OOyyUIHpaX2Hr+5V5UxTh+fPeC4nsGNhdw==", "license": "MIT", "funding": { "type": "opencollective", @@ -1113,9 +1113,9 @@ } }, "node_modules/@mui/icons-material": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.1.10.tgz", - "integrity": "sha512-G6P1BCSt6EQDcKca47KwvKjlqgOXFbp2I3oWiOlFgKYTANBH89yk7ttMQ5ysqNxSYAB+4TdM37MlPYp4+FkVrQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.2.0.tgz", + "integrity": "sha512-WR1EEhGOSvxAsoTSzWZBlrWFjul8wziDrII4rC3PvMBHhBYBqEc2n/0aamfFbwkH5EiYb96aqc6kYY6tB310Sw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0" @@ -1128,7 +1128,7 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@mui/material": "^6.1.10", + "@mui/material": "^6.2.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, @@ -1139,16 +1139,16 @@ } }, "node_modules/@mui/lab": { - "version": "6.0.0-beta.18", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-6.0.0-beta.18.tgz", - "integrity": "sha512-O7jNn36Jb0530NOZeFLj33RGB57x3kfyiYOaj5sL/j/Pmq9T0tonKMkoW/AUCucmBa7RuEzEYMyqBpfqminebA==", + "version": "6.0.0-beta.19", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-6.0.0-beta.19.tgz", + "integrity": "sha512-t7iub8kjpLdA5uDGwGnNRjtGc1vYEUnDwSROjKrnYqjOlCQhBajFa8uoQtaST6jE/VEk6cxpDMnN5MalC6YpCg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/base": "5.0.0-beta.64", - "@mui/system": "^6.1.10", + "@mui/base": "5.0.0-beta.66", + "@mui/system": "^6.2.0", "@mui/types": "^7.2.19", - "@mui/utils": "^6.1.10", + "@mui/utils": "^6.2.0", "clsx": "^2.1.1", "prop-types": "^15.8.1" }, @@ -1162,8 +1162,8 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material": "^6.1.10", - "@mui/material-pigment-css": "^6.1.10", + "@mui/material": "^6.2.0", + "@mui/material-pigment-css": "^6.2.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -1184,22 +1184,22 @@ } }, "node_modules/@mui/material": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.1.10.tgz", - "integrity": "sha512-txnwYObY4N9ugv5T2n5h1KcbISegZ6l65w1/7tpSU5OB6MQCU94YkP8n/3slDw2KcEfRk4+4D8EUGfhSPMODEQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.2.0.tgz", + "integrity": "sha512-7FXXUPIyYzP02a7GvqwJ7ocmdP+FkvLvmy/uxG1TDmTlsr8nEClQp75uxiVznJqAY/jJy4d+Rj/fNWNxwidrYQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/core-downloads-tracker": "^6.1.10", - "@mui/system": "^6.1.10", + "@mui/core-downloads-tracker": "^6.2.0", + "@mui/system": "^6.2.0", "@mui/types": "^7.2.19", - "@mui/utils": "^6.1.10", + "@mui/utils": "^6.2.0", "@popperjs/core": "^2.11.8", "@types/react-transition-group": "^4.4.11", "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1", - "react-is": "^18.3.1", + "react-is": "^19.0.0", "react-transition-group": "^4.4.5" }, "engines": { @@ -1212,7 +1212,7 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material-pigment-css": "^6.1.10", + "@mui/material-pigment-css": "^6.2.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -1232,14 +1232,20 @@ } } }, + "node_modules/@mui/material/node_modules/react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", + "license": "MIT" + }, "node_modules/@mui/private-theming": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.1.10.tgz", - "integrity": "sha512-DqgsH0XFEweeG3rQfVkqTkeXcj/E76PGYWag8flbPdV8IYdMo+DfVdFlZK8JEjsaIVD2Eu1kJg972XnH5pfnBQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.2.0.tgz", + "integrity": "sha512-lYd2MrVddhentF1d/cMXKnwlDjr/shbO3A2eGq22PCYUoZaqtAGZMc0U86KnJ/Sh5YzNYePqTOaaowAN8Qea8A==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/utils": "^6.1.10", + "@mui/utils": "^6.2.0", "prop-types": "^15.8.1" }, "engines": { @@ -1260,9 +1266,9 @@ } }, "node_modules/@mui/styled-engine": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.1.10.tgz", - "integrity": "sha512-+NV9adKZYhslJ270iPjf2yzdVJwav7CIaXcMlPSi1Xy1S/zRe5xFgZ6BEoMdmGRpr34lIahE8H1acXP2myrvRw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.2.0.tgz", + "integrity": "sha512-rV4YCu6kcCjMnHFXU/tQcL6XfYVfFVR8n3ZVNGnk2rpXnt/ctOPJsF+eUQuhkHciueLVKpI06+umr1FxWWhVmQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", @@ -1294,16 +1300,16 @@ } }, "node_modules/@mui/system": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.1.10.tgz", - "integrity": "sha512-5YNIqxETR23SIkyP7MY2fFnXmplX/M4wNi2R+10AVRd3Ub+NLctWY/Vs5vq1oAMF0eSDLhRTGUjaUe+IGSfWqg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.2.0.tgz", + "integrity": "sha512-DCeqev9Cd4f4pm3O1lqSGW/DIHHBG6ZpqMX9iIAvN4asYv+pPWv2/lKov9kWk5XThhxFnGSv93SRNE1kNRRg5Q==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", - "@mui/private-theming": "^6.1.10", - "@mui/styled-engine": "^6.1.10", + "@mui/private-theming": "^6.2.0", + "@mui/styled-engine": "^6.2.0", "@mui/types": "^7.2.19", - "@mui/utils": "^6.1.10", + "@mui/utils": "^6.2.0", "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1" @@ -1348,17 +1354,17 @@ } }, "node_modules/@mui/utils": { - "version": "6.1.10", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.1.10.tgz", - "integrity": "sha512-1ETuwswGjUiAf2dP9TkBy8p49qrw2wXa+RuAjNTRE5+91vtXJ1HKrs7H9s8CZd1zDlQVzUcUAPm9lpQwF5ogTw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.2.0.tgz", + "integrity": "sha512-77CaFJi+OIi2SjbPwCis8z5DXvE0dfx9hBz5FguZHt1VYFlWEPCWTHcMsQCahSErnfik5ebLsYK8+D+nsjGVfw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", "@mui/types": "^7.2.19", - "@types/prop-types": "^15.7.13", + "@types/prop-types": "^15.7.14", "clsx": "^2.1.1", "prop-types": "^15.8.1", - "react-is": "^18.3.1" + "react-is": "^19.0.0" }, "engines": { "node": ">=14.0.0" @@ -1377,6 +1383,12 @@ } } }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", + "license": "MIT" + }, "node_modules/@mui/x-charts": { "version": "7.23.1", "resolved": "https://registry.npmjs.org/@mui/x-charts/-/x-charts-7.23.1.tgz", @@ -2354,9 +2366,9 @@ "license": "MIT" }, "node_modules/@types/prop-types": { - "version": "15.7.13", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", - "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", + "version": "15.7.14", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", + "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==", "license": "MIT" }, "node_modules/@types/react": { diff --git a/Client/package.json b/Client/package.json index cece1c8e3..a6645fff1 100644 --- a/Client/package.json +++ b/Client/package.json @@ -14,9 +14,9 @@ "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@fontsource/roboto": "^5.0.13", - "@mui/icons-material": "6.1.10", - "@mui/lab": "6.0.0-beta.18", - "@mui/material": "6.1.10", + "@mui/icons-material": "6.2.0", + "@mui/lab": "6.0.0-beta.19", + "@mui/material": "6.2.0", "@mui/x-charts": "^7.5.1", "@mui/x-data-grid": "7.23.1", "@mui/x-date-pickers": "7.23.1", From b41fe1e70ef828edb58997464237e037cf55947a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20=C5=9Ei=C5=9Fmano=C4=9Flu?= Date: Thu, 12 Dec 2024 00:31:27 +0300 Subject: [PATCH 18/62] fix: update demo server URLs to 'checkmate-demo.bluewavelabs.ca' --- Docker/dist/nginx/conf.d/default.conf | 2 +- Docker/test/docker-compose.yaml | 2 +- Docker/test/prod/docker-compose.yaml | 2 +- Docker/test/prod/nginx/conf.d/default.conf | 8 ++++---- Server/openapi.json | 2 +- guides/README.md | 2 +- guides/developers-guide/general-project-structure.md | 2 +- guides/users-guide/quickstart.md | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Docker/dist/nginx/conf.d/default.conf b/Docker/dist/nginx/conf.d/default.conf index a3ad90ead..0592dcd06 100644 --- a/Docker/dist/nginx/conf.d/default.conf +++ b/Docker/dist/nginx/conf.d/default.conf @@ -2,7 +2,7 @@ server { listen 80; listen [::]:80; - server_name uptime-demo.bluewavelabs.ca; + server_name checkmate-demo.bluewavelabs.ca; server_tokens off; location /.well-known/acme-challenge/ { diff --git a/Docker/test/docker-compose.yaml b/Docker/test/docker-compose.yaml index 24e6d1165..e262ef1a2 100644 --- a/Docker/test/docker-compose.yaml +++ b/Docker/test/docker-compose.yaml @@ -2,7 +2,7 @@ services: client: image: uptime_client:latest environment: - UPTIME_APP_API_BASE_URL: "https://uptime-demo.bluewavelabs.ca/api/v1" + UPTIME_APP_API_BASE_URL: "https://checkmate-demo.bluewavelabs.ca/api/v1" ports: - "80:80" - "443:443" diff --git a/Docker/test/prod/docker-compose.yaml b/Docker/test/prod/docker-compose.yaml index 24e6d1165..e262ef1a2 100644 --- a/Docker/test/prod/docker-compose.yaml +++ b/Docker/test/prod/docker-compose.yaml @@ -2,7 +2,7 @@ services: client: image: uptime_client:latest environment: - UPTIME_APP_API_BASE_URL: "https://uptime-demo.bluewavelabs.ca/api/v1" + UPTIME_APP_API_BASE_URL: "https://checkmate-demo.bluewavelabs.ca/api/v1" ports: - "80:80" - "443:443" diff --git a/Docker/test/prod/nginx/conf.d/default.conf b/Docker/test/prod/nginx/conf.d/default.conf index 5f37d48b7..98e1bd97d 100644 --- a/Docker/test/prod/nginx/conf.d/default.conf +++ b/Docker/test/prod/nginx/conf.d/default.conf @@ -2,7 +2,7 @@ server { listen 80; listen [::]:80; - server_name uptime-demo.bluewavelabs.ca; + server_name checkmate-demo.bluewavelabs.ca; server_tokens off; location /.well-known/acme-challenge/ { @@ -38,10 +38,10 @@ server { listen 443 default_server ssl http2; listen [::]:443 ssl http2; - server_name uptime-demo.bluewavelabs.ca; + server_name checkmate-demo.bluewavelabs.ca; - ssl_certificate /etc/nginx/ssl/live/uptime-demo.bluewavelabs.ca/fullchain.pem; - ssl_certificate_key /etc/nginx/ssl/live/uptime-demo.bluewavelabs.ca/privkey.pem; + ssl_certificate /etc/nginx/ssl/live/checkmate-demo.bluewavelabs.ca/fullchain.pem; + ssl_certificate_key /etc/nginx/ssl/live/checkmate-demo.bluewavelabs.ca/privkey.pem; location / { root /usr/share/nginx/html; diff --git a/Server/openapi.json b/Server/openapi.json index 7ba2fc222..662efb19b 100644 --- a/Server/openapi.json +++ b/Server/openapi.json @@ -44,7 +44,7 @@ } }, { - "url": "https://uptime-demo.bluewavelabs.ca/{API_PATH}", + "url": "https://checkmate-demo.bluewavelabs.ca/{API_PATH}", "description": "Bluewave Demo Server", "variables": { "PORT": { diff --git a/guides/README.md b/guides/README.md index 3de3c7e59..841bfe37a 100644 --- a/guides/README.md +++ b/guides/README.md @@ -26,7 +26,7 @@ It regularly checks whether a server/website is accessible and performs optimall ## Demo -We have a [demo](https://uptime-demo.bluewavelabs.ca/) where you can test how the Uptime Manager works. The username is [uptimedemo@demo.com](mailto:uptimedemo@demo.com) and the password is Demouser1! +We have a [demo](https://checkmate-demo.bluewavelabs.ca/) where you can test how the Uptime Manager works. The username is [uptimedemo@demo.com](mailto:uptimedemo@demo.com) and the password is Demouser1! ## Questions & ideas diff --git a/guides/developers-guide/general-project-structure.md b/guides/developers-guide/general-project-structure.md index da274f0f7..8f62c86c4 100644 --- a/guides/developers-guide/general-project-structure.md +++ b/guides/developers-guide/general-project-structure.md @@ -20,7 +20,7 @@ When making changes to the Front end please always keep future developers in min ### Back end -The back end of this project is not especially complex and is built around Express. The back end is a RESTful API and the [documentation can be found here](https://uptime-demo.bluewavelabs.ca/api-docs). +The back end of this project is not especially complex and is built around Express. The back end is a RESTful API and the [documentation can be found here](https://checkmate-demo.bluewavelabs.ca/api-docs). The application consists of several main conceptual models: diff --git a/guides/users-guide/quickstart.md b/guides/users-guide/quickstart.md index 57fde99b6..506cdb178 100644 --- a/guides/users-guide/quickstart.md +++ b/guides/users-guide/quickstart.md @@ -201,7 +201,7 @@ Our API is documented in accordance with the [OpenAPI spec](https://www.openapis You can see the documentation on your local development server at http://localhost:{port}/api-docs -You can also view the documentation on our demo server at [https://uptime-demo.bluewavelabs.ca/api-docs](https://uptime-demo.bluewavelabs.ca/api-docs) +You can also view the documentation on our demo server at [https://checkmate-demo.bluewavelabs.ca/api-docs](https://checkmate-demo.bluewavelabs.ca/api-docs) ### Error handling From 8bf254ee492384dd1ee0eb65208c1455fd98c020 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Wed, 11 Dec 2024 21:01:27 -0500 Subject: [PATCH 19/62] refactor: reverting unused function in infrastructure page --- Client/src/Pages/Infrastructure/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/Infrastructure/index.jsx b/Client/src/Pages/Infrastructure/index.jsx index ff6e5a9a9..084d7732f 100644 --- a/Client/src/Pages/Infrastructure/index.jsx +++ b/Client/src/Pages/Infrastructure/index.jsx @@ -203,7 +203,7 @@ function Infrastructure() { diff --git a/Client/src/Pages/Monitors/Home/index.jsx b/Client/src/Pages/Monitors/Home/index.jsx index 4c48bde3a..167fd1e67 100644 --- a/Client/src/Pages/Monitors/Home/index.jsx +++ b/Client/src/Pages/Monitors/Home/index.jsx @@ -61,7 +61,7 @@ const Monitors = ({ isAdmin }) => { onClick={() => { navigate("/monitors/create"); }} - sx={{ fontWeight: 500 }} + sx={{ fontWeight: 500, whiteSpace: "nowrap" }} > Create monitor diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx index b4056ffce..9b84b0286 100644 --- a/Client/src/Pages/PageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/index.jsx @@ -92,7 +92,7 @@ const PageSpeed = ({ isAdmin }) => { variant="contained" color="primary" onClick={() => navigate("/pagespeed/create")} - sx={{ whiteSpace: "nowrap" }} + sx={{ fontWeight: 500, whiteSpace: "nowrap" }} > Create new From f57b9a0fa1d43578724f5aa3aba3aa5b049d2870 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 12 Dec 2024 12:26:24 +0800 Subject: [PATCH 21/62] remove daterange from dependency array --- Client/src/Pages/Uptime/Details/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/Uptime/Details/index.jsx b/Client/src/Pages/Uptime/Details/index.jsx index 60b67fdc8..ac89041ec 100644 --- a/Client/src/Pages/Uptime/Details/index.jsx +++ b/Client/src/Pages/Uptime/Details/index.jsx @@ -100,7 +100,7 @@ const DetailsPage = ({ isAdmin }) => { } }; fetchCertificate(); - }, [authToken, monitorId, monitor, dateRange, uiTimezone, dateFormat]); + }, [authToken, monitorId, monitor, uiTimezone, dateFormat]); const splitDuration = (duration) => { const { time, format } = formatDurationSplit(duration); From 3840b3ec2dfbb19f157fe30b1a170235e20d4a72 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 12 Dec 2024 12:38:43 +0800 Subject: [PATCH 22/62] remove log statement --- Client/src/Pages/Infrastructure/CreateMonitor/index.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx index ff05b9ef2..74c257bae 100644 --- a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx +++ b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx @@ -148,8 +148,6 @@ const CreateInfrastructureMonitor = () => { thresholds, }; - console.log(form); - const action = await dispatch( createInfrastructureMonitor({ authToken, monitor: form }) ); From e33091f1821db8b5a8fe1a3cdc2e45f8775fffbd Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 12 Dec 2024 12:42:32 +0800 Subject: [PATCH 23/62] remove --- Client/src/Pages/Infrastructure/CreateMonitor/index.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx index 74c257bae..39a07c530 100644 --- a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx +++ b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx @@ -185,10 +185,6 @@ const CreateInfrastructureMonitor = () => { }); }; - const handleBlur = (event) => { - console.log("handleBlur", event); - }; - const handleNotifications = (event, type) => { const { value } = event.target; let notifications = [...infrastructureMonitor.notifications]; @@ -340,7 +336,6 @@ const CreateInfrastructureMonitor = () => { )} value={user?.email} onChange={(event) => handleNotifications(event, "email")} - onBlur={handleBlur} /> @@ -372,7 +367,6 @@ const CreateInfrastructureMonitor = () => { fieldName={METRIC_PREFIX + metric} fieldValue={infrastructureMonitor[METRIC_PREFIX + metric]} onFieldChange={handleChange} - onFieldBlur={handleBlur} alertUnit={metric == "temperature" ? "°C" : "%"} /> ); @@ -404,7 +398,7 @@ const CreateInfrastructureMonitor = () => { label="Check frequency" value={infrastructureMonitor.interval || 15} onChange={handleChange} - onBlur={handleBlur} + onBlur={} items={SELECT_VALUES} /> From 66dc6dbc1a8a52ceb39f427bb05845cb40ba5c26 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 00:09:41 -0500 Subject: [PATCH 24/62] refactor: extracting routes to own component --- Client/src/App.jsx | 199 +--------------------------------- Client/src/Routes/index.jsx | 209 ++++++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+), 195 deletions(-) create mode 100644 Client/src/Routes/index.jsx diff --git a/Client/src/App.jsx b/Client/src/App.jsx index 82c8203a8..b27373071 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -1,37 +1,9 @@ import { useEffect } from "react"; -import { Routes, Route, Navigate } from "react-router-dom"; import { useSelector } from "react-redux"; import { useDispatch } from "react-redux"; import "react-toastify/dist/ReactToastify.css"; import { ToastContainer } from "react-toastify"; -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 CreateInfrastructureMonitor from "./Pages/Infrastructure/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/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/Monitors/Details"; -import AdvancedSettings from "./Pages/AdvancedSettings"; -import Maintenance from "./Pages/Maintenance"; -import Configure from "./Pages/Monitors/Configure"; -import PageSpeed from "./Pages/PageSpeed"; -import CreatePageSpeed from "./Pages/PageSpeed/CreatePageSpeed"; -import CreateNewMaintenanceWindow from "./Pages/Maintenance/CreateMaintenance"; -import PageSpeedDetails from "./Pages/PageSpeed/Details"; -import PageSpeedConfigure from "./Pages/PageSpeed/Configure"; -import HomeLayout from "./Components/Layouts/HomeLayout"; -import withAdminCheck from "./Components/HOC/withAdminCheck"; -import withAdminProp from "./Components/HOC/withAdminProp"; + import { ThemeProvider } from "@emotion/react"; import lightTheme from "./Utils/Theme/lightTheme"; import darkTheme from "./Utils/Theme/darkTheme"; @@ -39,18 +11,9 @@ import { CssBaseline, GlobalStyles } from "@mui/material"; import { getAppSettings } from "./Features/Settings/settingsSlice"; import { logger } from "./Utils/Logger"; // Import the logger import { networkService } from "./main"; -import { Infrastructure } from "./Pages/Infrastructure"; -import InfrastructureDetails from "./Pages/Infrastructure/Details"; +import { Routes } from "./Routes"; + function App() { - const AdminCheckedRegister = withAdminCheck(Register); - const MonitorsWithAdminProp = withAdminProp(Monitors); - const MonitorDetailsWithAdminProp = withAdminProp(Details); - const PageSpeedWithAdminProp = withAdminProp(PageSpeed); - const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails); - const MaintenanceWithAdminProp = withAdminProp(Maintenance); - const SettingsWithAdminProp = withAdminProp(Settings); - const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings); - const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails); const mode = useSelector((state) => state.ui.mode); const { authToken } = useSelector((state) => state.auth); const dispatch = useDispatch(); @@ -82,161 +45,7 @@ function App() { }; }} /> - {/* Extract Routes to Routes */} - - } - > - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - - } - /> - - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - - } - /> - - } - /> - - } - /> - - - } - /> - - } - /> - - } - /> - - } - /> - - } - /> - } - /> - } - /> - } - /> - + ); diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx new file mode 100644 index 000000000..8397729ca --- /dev/null +++ b/Client/src/Routes/index.jsx @@ -0,0 +1,209 @@ +import { Navigate, Route, Routes as LibRoutes } from "react-router"; +import HomeLayout from "../Components/Layouts/HomeLayout"; +import { Infrastructure } from "../Pages/Infrastructure"; +import InfrastructureDetails from "../Pages/Infrastructure/Details"; +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 CreateInfrastructureMonitor from "../Pages/Infrastructure/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/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/Monitors/Details"; +import AdvancedSettings from "../Pages/AdvancedSettings"; +import Maintenance from "../Pages/Maintenance"; +import Configure from "../Pages/Monitors/Configure"; +import PageSpeed from "../Pages/PageSpeed"; +import CreatePageSpeed from "../Pages/PageSpeed/CreatePageSpeed"; +import CreateNewMaintenanceWindow from "../Pages/Maintenance/CreateMaintenance"; +import PageSpeedDetails from "../Pages/PageSpeed/Details"; +import PageSpeedConfigure from "../Pages/PageSpeed/Configure"; +import withAdminCheck from "../Components/HOC/withAdminCheck"; +import withAdminProp from "../Components/HOC/withAdminProp"; + +const Routes = () => { + const AdminCheckedRegister = withAdminCheck(Register); + const MonitorsWithAdminProp = withAdminProp(Monitors); + const MonitorDetailsWithAdminProp = withAdminProp(Details); + const PageSpeedWithAdminProp = withAdminProp(PageSpeed); + const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails); + const MaintenanceWithAdminProp = withAdminProp(Maintenance); + const SettingsWithAdminProp = withAdminProp(Settings); + const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings); + const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails); + return ( + + } + > + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + + } + /> + + } + /> + } + /> + } + /> + } + /> + } + /> + } + /> + + } + /> + + } + /> + + } + /> + + + } + /> + + } + /> + + } + /> + + } + /> + + } + /> + } + /> + } + /> + } + /> + + ); +}; + +export { Routes }; + +/* import { createBrowserRouter } from "react-router-dom"; + +const router = createBrowserRouter({ + { + path: "/", + } +}); + +export { router }; */ From 2145be5160cd1cb33a5f93a7befa2e5c4753a64f Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:13:10 -0500 Subject: [PATCH 25/62] Minor update to pull_request_template.md --- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index 3d9b31e2d..d54352dac 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -1,6 +1,6 @@ ## Describe your changes -Provide a brief description of the changes you’ve made and their purpose. +Briefly describe the changes you made and their purpose. ## Issue number @@ -11,4 +11,10 @@ Mention the issue number(s) this PR addresses (e.g., #123). - [ ] I have performed a self-review of my code. - [ ] I have included the issue # in the PR. - [ ] I have labelled the PR correctly. -- [ ] My PR is granular and targeted to one specific feature only. +- [ ] I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application). +- [ ] I made sure font sizes, color choices etc are all referenced from the theme. +- [ ] My PR is granular and targeted to one specific feature. +- [ ] I took a screenshot or a video and attached to this PR if there is a UI change. + + + From 52234531db69ed2ae544158f2a39b824544c82ba Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:17:25 -0500 Subject: [PATCH 26/62] Update pull_request_template.md --- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index d54352dac..55d456545 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -11,6 +11,7 @@ Mention the issue number(s) this PR addresses (e.g., #123). - [ ] I have performed a self-review of my code. - [ ] I have included the issue # in the PR. - [ ] I have labelled the PR correctly. +- [ ] The issue I am working on is assigned to me. - [ ] I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application). - [ ] I made sure font sizes, color choices etc are all referenced from the theme. - [ ] My PR is granular and targeted to one specific feature. From 7d33ac11b5588568d28a634fbe6c297310a9cafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20D=C3=B6rr?= Date: Thu, 12 Dec 2024 06:33:32 +0100 Subject: [PATCH 27/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aec89be80..ca3c19c95 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ We've just launched our [Discussions](https://github.com/bluewave-labs/bluewave- ## 🤝 Contributing -We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 600+ stars and attracted 30+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! +We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1300+ stars and attracted 30+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! Here's how you can contribute: From a70e96f1f3f32513ca0829c504f146d392e19693 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 08:24:10 -0500 Subject: [PATCH 28/62] refactor: avoid repetition of the protected routes component --- .../src/Components/ProtectedRoute/index.jsx | 2 +- Client/src/Pages/Auth/Login.jsx | 1 + Client/src/Routes/index.jsx | 55 ++++++++----------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/Client/src/Components/ProtectedRoute/index.jsx b/Client/src/Components/ProtectedRoute/index.jsx index 5b1032ab8..c10ebba7f 100644 --- a/Client/src/Components/ProtectedRoute/index.jsx +++ b/Client/src/Components/ProtectedRoute/index.jsx @@ -15,7 +15,7 @@ import PropTypes from "prop-types"; const ProtectedRoute = ({ Component, ...rest }) => { const authState = useSelector((state) => state.auth); - + console.log("Protected"); return authState.authToken ? ( ) : ( diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx index 6329835ef..89992b109 100644 --- a/Client/src/Pages/Auth/Login.jsx +++ b/Client/src/Pages/Auth/Login.jsx @@ -367,6 +367,7 @@ StepTwo.propTypes = { }; const Login = () => { + console.log("login"); const dispatch = useDispatch(); const navigate = useNavigate(); const theme = useTheme(); diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index 8397729ca..76c90784e 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -44,7 +44,7 @@ const Routes = () => { } + element={} > { /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> } + element={} /> { /> } + element={} /> } + element={} /> - } + element={} /> { } /> } /> @@ -171,11 +164,6 @@ const Routes = () => { element={} /> - } - /> - } @@ -192,6 +180,11 @@ const Routes = () => { path="/new-password-confirmed" element={} /> + + } + /> ); }; From 910080820bf339290dcc7c9c43cdb0c7e38cb840 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 09:07:11 -0500 Subject: [PATCH 29/62] refactor: removed withAdminProps HOC and changed for custom hook reducing component wrapping --- Client/src/Components/HOC/withAdminProp.jsx | 25 ---------- .../src/Components/ProtectedRoute/index.jsx | 1 - Client/src/Pages/AdvancedSettings/index.jsx | 5 +- Client/src/Pages/Maintenance/index.jsx | 7 +-- Client/src/Pages/Monitors/Details/index.jsx | 4 +- Client/src/Pages/Monitors/Home/index.jsx | 4 +- Client/src/Pages/PageSpeed/Details/index.jsx | 4 +- Client/src/Pages/PageSpeed/index.jsx | 5 +- Client/src/Pages/Settings/index.jsx | 4 +- Client/src/Routes/index.jsx | 50 ++++--------------- 10 files changed, 32 insertions(+), 77 deletions(-) delete mode 100644 Client/src/Components/HOC/withAdminProp.jsx diff --git a/Client/src/Components/HOC/withAdminProp.jsx b/Client/src/Components/HOC/withAdminProp.jsx deleted file mode 100644 index b55893119..000000000 --- a/Client/src/Components/HOC/withAdminProp.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import { useSelector } from "react-redux"; - -const withAdminProp = (WrappedComponent) => { - const WithAdminProp = (props) => { - const { user } = useSelector((state) => state.auth); - const isAdmin = - (user?.role?.includes("admin") ?? false) || - (user?.role?.includes("superadmin") ?? false); - - return ( - - ); - }; - - const wrappedComponentName = - WrappedComponent.displayName || WrappedComponent.name || "Component"; - WithAdminProp.displayName = `WithAdminProp(${wrappedComponentName})`; - - return WithAdminProp; -}; - -export default withAdminProp; diff --git a/Client/src/Components/ProtectedRoute/index.jsx b/Client/src/Components/ProtectedRoute/index.jsx index c10ebba7f..1a8cf9aa0 100644 --- a/Client/src/Components/ProtectedRoute/index.jsx +++ b/Client/src/Components/ProtectedRoute/index.jsx @@ -15,7 +15,6 @@ import PropTypes from "prop-types"; const ProtectedRoute = ({ Component, ...rest }) => { const authState = useSelector((state) => state.auth); - console.log("Protected"); return authState.authToken ? ( ) : ( diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 90bcf21d6..14ecb6f8f 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -14,10 +14,11 @@ import { useState, useEffect } from "react"; import Select from "../../Components/Inputs/Select"; import { advancedSettingsValidation } from "../../Validation/validation"; import { buildErrors, hasValidationErrors } from "../../Validation/error"; +import { useIsAdmin } from "../../Hooks/useIsAdmin"; -const AdvancedSettings = ({ isAdmin }) => { +const AdvancedSettings = () => { const navigate = useNavigate(); - + const isAdmin = useIsAdmin; useEffect(() => { if (!isAdmin) { navigate("/"); diff --git a/Client/src/Pages/Maintenance/index.jsx b/Client/src/Pages/Maintenance/index.jsx index fd0d7edc3..5c2930294 100644 --- a/Client/src/Pages/Maintenance/index.jsx +++ b/Client/src/Pages/Maintenance/index.jsx @@ -8,13 +8,14 @@ import { useSelector } from "react-redux"; import { networkService } from "../../main"; import Breadcrumbs from "../../Components/Breadcrumbs"; import { useNavigate } from "react-router-dom"; +import { useIsAdmin } from "../../Hooks/useIsAdmin"; -const Maintenance = ({ isAdmin }) => { +const Maintenance = () => { const theme = useTheme(); const navigate = useNavigate(); const { authToken } = useSelector((state) => state.auth); const { rowsPerPage } = useSelector((state) => state.ui.maintenance); - + const isAdmin = useIsAdmin(); const [maintenanceWindows, setMaintenanceWindows] = useState([]); const [maintenanceWindowCount, setMaintenanceWindowCount] = useState(0); const [page, setPage] = useState(0); @@ -99,7 +100,7 @@ const Maintenance = ({ isAdmin }) => { "Stop sending alerts in maintenance windows", ]} link="/maintenance/create" - isAdmin={true} + isAdmin={isAdmin} /> )} diff --git a/Client/src/Pages/Monitors/Details/index.jsx b/Client/src/Pages/Monitors/Details/index.jsx index ebb664b79..68d21903c 100644 --- a/Client/src/Pages/Monitors/Details/index.jsx +++ b/Client/src/Pages/Monitors/Details/index.jsx @@ -32,14 +32,16 @@ import SkeletonLayout from "./skeleton"; import "./index.css"; import useUtils from "../utils"; import { formatDateWithTz } from "../../../Utils/timeUtils"; +import { useIsAdmin } from "../../../Hooks/useIsAdmin"; /** * Details page component displaying monitor details and related information. * @component */ -const DetailsPage = ({ isAdmin }) => { +const DetailsPage = () => { const theme = useTheme(); const { statusColor, statusStyles, statusMsg, determineState } = useUtils(); + const isAdmin = useIsAdmin(); const [monitor, setMonitor] = useState({}); const { monitorId } = useParams(); const { authToken } = useSelector((state) => state.auth); diff --git a/Client/src/Pages/Monitors/Home/index.jsx b/Client/src/Pages/Monitors/Home/index.jsx index 167fd1e67..15dc814df 100644 --- a/Client/src/Pages/Monitors/Home/index.jsx +++ b/Client/src/Pages/Monitors/Home/index.jsx @@ -12,10 +12,12 @@ import StatusBox from "./StatusBox"; import Breadcrumbs from "../../../Components/Breadcrumbs"; import Greeting from "../../../Utils/greeting"; import { CurrentMonitoring } from "./CurrentMonitoring"; +import { useIsAdmin } from "../../../Hooks/useIsAdmin"; -const Monitors = ({ isAdmin }) => { +const Monitors = () => { const theme = useTheme(); const navigate = useNavigate(); + const isAdmin = useIsAdmin(); const monitorState = useSelector((state) => state.uptimeMonitors); const authState = useSelector((state) => state.auth); const dispatch = useDispatch({}); diff --git a/Client/src/Pages/PageSpeed/Details/index.jsx b/Client/src/Pages/PageSpeed/Details/index.jsx index ca852e124..d25848ff2 100644 --- a/Client/src/Pages/PageSpeed/Details/index.jsx +++ b/Client/src/Pages/PageSpeed/Details/index.jsx @@ -21,10 +21,12 @@ import Checkbox from "../../../Components/Inputs/Checkbox"; import PieChart from "./Charts/PieChart"; import useUtils from "../../Monitors/utils"; import "./index.css"; +import { useIsAdmin } from "../../../Hooks/useIsAdmin"; -const PageSpeedDetails = ({ isAdmin }) => { +const PageSpeedDetails = () => { const theme = useTheme(); const navigate = useNavigate(); + const isAdmin = useIsAdmin(); const { statusColor, pagespeedStatusMsg, determineState } = useUtils(); const [monitor, setMonitor] = useState({}); const [audits, setAudits] = useState({}); diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx index 9b84b0286..b18148aa8 100644 --- a/Client/src/Pages/PageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/index.jsx @@ -12,11 +12,12 @@ import SkeletonLayout from "./skeleton"; import Card from "./card"; import { networkService } from "../../main"; import { Heading } from "../../Components/Heading"; -const PageSpeed = ({ isAdmin }) => { +import { useIsAdmin } from "../../Hooks/useIsAdmin"; +const PageSpeed = () => { const theme = useTheme(); const dispatch = useDispatch(); const navigate = useNavigate(); - + const isAdmin = useIsAdmin(); const { user, authToken } = useSelector((state) => state.auth); const [isLoading, setIsLoading] = useState(true); const [monitors, setMonitors] = useState([]); diff --git a/Client/src/Pages/Settings/index.jsx b/Client/src/Pages/Settings/index.jsx index 8a5e73bc3..aab9fa537 100644 --- a/Client/src/Pages/Settings/index.jsx +++ b/Client/src/Pages/Settings/index.jsx @@ -23,11 +23,13 @@ import { networkService } from "../../main"; import { settingsValidation } from "../../Validation/validation"; import { useNavigate } from "react-router"; import Dialog from "../../Components/Dialog"; +import { useIsAdmin } from "../../Hooks/useIsAdmin"; const SECONDS_PER_DAY = 86400; -const Settings = ({ isAdmin }) => { +const Settings = () => { const theme = useTheme(); + const isAdmin = useIsAdmin(); const { user, authToken } = useSelector((state) => state.auth); const { checkTTL } = user; const { isLoading } = useSelector((state) => state.uptimeMonitors); diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index 76c90784e..d3e14a02d 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -28,18 +28,9 @@ import CreateNewMaintenanceWindow from "../Pages/Maintenance/CreateMaintenance"; import PageSpeedDetails from "../Pages/PageSpeed/Details"; import PageSpeedConfigure from "../Pages/PageSpeed/Configure"; import withAdminCheck from "../Components/HOC/withAdminCheck"; -import withAdminProp from "../Components/HOC/withAdminProp"; const Routes = () => { const AdminCheckedRegister = withAdminCheck(Register); - const MonitorsWithAdminProp = withAdminProp(Monitors); - const MonitorDetailsWithAdminProp = withAdminProp(Details); - const PageSpeedWithAdminProp = withAdminProp(PageSpeed); - const PageSpeedDetailsWithAdminProp = withAdminProp(PageSpeedDetails); - const MaintenanceWithAdminProp = withAdminProp(Maintenance); - const SettingsWithAdminProp = withAdminProp(Settings); - const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings); - const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails); return ( { /> } + element={} /> { /> } + element={
} /> { /> } + element={} /> { /> } + element={} /> { /> } + element={} /> - } @@ -110,7 +100,7 @@ const Routes = () => { /> } + element={} /> { /> } + element={} /> } + element={} /> { /> - } + element={} /> - } + element={} /> @@ -190,13 +170,3 @@ const Routes = () => { }; export { Routes }; - -/* import { createBrowserRouter } from "react-router-dom"; - -const router = createBrowserRouter({ - { - path: "/", - } -}); - -export { router }; */ From cce1ed610c92b1b1ec4c09c14f92166d7da4ef6e Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 09:11:08 -0500 Subject: [PATCH 30/62] chore: delete console --- Client/src/Pages/Auth/Login.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx index 89992b109..6329835ef 100644 --- a/Client/src/Pages/Auth/Login.jsx +++ b/Client/src/Pages/Auth/Login.jsx @@ -367,7 +367,6 @@ StepTwo.propTypes = { }; const Login = () => { - console.log("login"); const dispatch = useDispatch(); const navigate = useNavigate(); const theme = useTheme(); From ee4ef158748aacd62738cfa4f5f3155fc75cff42 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 09:20:24 -0500 Subject: [PATCH 31/62] resolving conflicts --- .../Infrastructure/CreateMonitor/index.jsx | 1 - .../Pages/PageSpeed/CreatePageSpeed/index.jsx | 2 +- Client/src/Routes/index.jsx | 18 +++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx index df7829930..56162d2a5 100644 --- a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx +++ b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx @@ -397,7 +397,6 @@ const CreateInfrastructureMonitor = () => { label="Check frequency" value={infrastructureMonitor.interval || 15} onChange={handleChange} - onBlur={} items={SELECT_VALUES} /> diff --git a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx index ccab3442f..30592e2eb 100644 --- a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx @@ -20,7 +20,7 @@ import LoadingButton from "@mui/lab/LoadingButton"; import Breadcrumbs from "../../../Components/Breadcrumbs"; import TextInput from "../../../Components/Inputs/TextInput"; import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments"; -import { ConfigBox } from "../../Monitors/styled"; +import { ConfigBox } from "../../Uptime/styled"; import { createToast } from "../../../Utils/toastUtils"; import Radio from "../../../Components/Inputs/Radio"; diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index d3e14a02d..ba7822fa7 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -6,8 +6,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 Monitors 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"; @@ -18,10 +18,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 Details 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"; @@ -39,22 +39,22 @@ const Routes = () => { > } + element={} /> } /> } /> } /> } /> Date: Thu, 12 Dec 2024 22:39:42 +0800 Subject: [PATCH 32/62] Revert "fix: update red palette colors" This reverts commit 79dd781386ae8c96f5f9993b86a7ab5044f7b0ef. --- Client/src/Utils/Theme/constants.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Client/src/Utils/Theme/constants.js b/Client/src/Utils/Theme/constants.js index 422648028..df9b5da93 100644 --- a/Client/src/Utils/Theme/constants.js +++ b/Client/src/Utils/Theme/constants.js @@ -51,8 +51,7 @@ const paletteColors = { red50: "#F9ECED", red100: "#FBD1D1", red200: "#F04438", - red300: "#EBA8A9", - red400: "#D32F2F", + red300: "#D32F2F", red700: "#542426", red800: "#301A1F", orange50: "#FEF8EA", @@ -110,13 +109,13 @@ const semanticColors = { }, error: { main: { - light: paletteColors.red400, - dark: paletteColors.red400, - }, - contrastText: { light: paletteColors.red300, dark: paletteColors.red300, }, + contrastText: { + light: paletteColors.gray50, + dark: paletteColors.gray50, + }, light: { light: paletteColors.red100, dark: paletteColors.red700, From dc46a0c2b245eba1f4717e81b9753e7801121b8d Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 10:23:36 -0500 Subject: [PATCH 33/62] hotfix: imports --- Client/src/Pages/Infrastructure/CreateMonitor/index.jsx | 1 - Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx index df7829930..56162d2a5 100644 --- a/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx +++ b/Client/src/Pages/Infrastructure/CreateMonitor/index.jsx @@ -397,7 +397,6 @@ const CreateInfrastructureMonitor = () => { label="Check frequency" value={infrastructureMonitor.interval || 15} onChange={handleChange} - onBlur={} items={SELECT_VALUES} /> diff --git a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx index ccab3442f..30592e2eb 100644 --- a/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx @@ -20,7 +20,7 @@ import LoadingButton from "@mui/lab/LoadingButton"; import Breadcrumbs from "../../../Components/Breadcrumbs"; import TextInput from "../../../Components/Inputs/TextInput"; import { HttpAdornment } from "../../../Components/Inputs/TextInput/Adornments"; -import { ConfigBox } from "../../Monitors/styled"; +import { ConfigBox } from "../../Uptime/styled"; import { createToast } from "../../../Utils/toastUtils"; import Radio from "../../../Components/Inputs/Radio"; From 1a856ed463723292d908069c0dbe9787c9fb77d1 Mon Sep 17 00:00:00 2001 From: Peter Carl Pardo Date: Fri, 13 Dec 2024 00:47:09 +0800 Subject: [PATCH 34/62] fix: Update chart color for "Poor" category --- Client/src/Pages/Monitors/Details/Charts/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/Monitors/Details/Charts/index.jsx b/Client/src/Pages/Monitors/Details/Charts/index.jsx index fc01fbfc9..7c5adc9e2 100644 --- a/Client/src/Pages/Monitors/Details/Charts/index.jsx +++ b/Client/src/Pages/Monitors/Details/Charts/index.jsx @@ -262,7 +262,7 @@ const ResponseGaugeChart = ({ data }) => { } : { category: "Poor", - main: theme.palette.error.contrastText, + main: theme.palette.error.light, bg: theme.palette.error.dark, }; From 4f2a1b7342e40b1fc697951da653782ab02b72b1 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:03:26 -0500 Subject: [PATCH 35/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ca3c19c95..b9565dece 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ We've just launched our [Discussions](https://github.com/bluewave-labs/bluewave- ## 🤝 Contributing -We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1300+ stars and attracted 30+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! +We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1500 stars and attracted 35+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! Here's how you can contribute: From 1aa05eb438def3027de13f0c98f16081a2b421ce Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 12 Dec 2024 19:05:54 +0000 Subject: [PATCH 36/62] fix(deps): update material-ui monorepo to v7.23.2 --- Client/package-lock.json | 22 +++++++++++----------- Client/package.json | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Client/package-lock.json b/Client/package-lock.json index d60225e07..f4779d7d7 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -15,8 +15,8 @@ "@mui/lab": "6.0.0-beta.19", "@mui/material": "6.2.0", "@mui/x-charts": "^7.5.1", - "@mui/x-data-grid": "7.23.1", - "@mui/x-date-pickers": "7.23.1", + "@mui/x-data-grid": "7.23.2", + "@mui/x-date-pickers": "7.23.2", "@reduxjs/toolkit": "2.5.0", "axios": "^1.7.4", "dayjs": "1.11.13", @@ -1390,9 +1390,9 @@ "license": "MIT" }, "node_modules/@mui/x-charts": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@mui/x-charts/-/x-charts-7.23.1.tgz", - "integrity": "sha512-hIVRitRSFxf60BHDr+T7Tarj4lLwOV8flebeIsyEPJJHvSlaFNFwr6rqYFb8SGULYU7ppKMhiESD1+YqgJSU1Q==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@mui/x-charts/-/x-charts-7.23.2.tgz", + "integrity": "sha512-wLeogvQZZtyrAOdG06mDzIQSHBSAB09Uy16AYRUcMxVObi7Fs0i3TJUMpQHMYz1/1DvE1u8zstDgVpVfk8/iCA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.25.7", @@ -1448,9 +1448,9 @@ } }, "node_modules/@mui/x-data-grid": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-7.23.1.tgz", - "integrity": "sha512-1CumfhjGA+WgNtnN3ZD3gCOw6RVf/cEy2X2gS0iyXtVsFNaE+qtyMz9KesQsIzi9u13Wj3RNuhBdH0C5qXtAhQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-7.23.2.tgz", + "integrity": "sha512-Xhm4Bh+WiU5MSLFIZ8mE1egHoS0xPEVlwvjYvairPIkxNPubB7f+gtLkuAJ2+m+BYbgO7yDte+Pp7dfjkU+vOA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.25.7", @@ -1485,9 +1485,9 @@ } }, "node_modules/@mui/x-date-pickers": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.23.1.tgz", - "integrity": "sha512-Jr4beZ7r2lvWBaFnkIAg9BgiNFcfeJy4AUe3MbG10BBSZyB++odGqhOUAIGqkP7MpUzEGlTv4NUaaD7gYTAQPg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.23.2.tgz", + "integrity": "sha512-Kt9VsEnShaBKiaastTYku66UIWptgc9UMA16d0G/0TkfIsvZrAD3iacQR6HHAXWspaFshdfsRmW2JAoFhzKZsg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.25.7", diff --git a/Client/package.json b/Client/package.json index a6645fff1..62f2c7eb6 100644 --- a/Client/package.json +++ b/Client/package.json @@ -18,8 +18,8 @@ "@mui/lab": "6.0.0-beta.19", "@mui/material": "6.2.0", "@mui/x-charts": "^7.5.1", - "@mui/x-data-grid": "7.23.1", - "@mui/x-date-pickers": "7.23.1", + "@mui/x-data-grid": "7.23.2", + "@mui/x-date-pickers": "7.23.2", "@reduxjs/toolkit": "2.5.0", "axios": "^1.7.4", "dayjs": "1.11.13", From a8a8664fc670cde4f0ba6fc47787f2b92937ea37 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Thu, 12 Dec 2024 14:43:57 -0500 Subject: [PATCH 37/62] refactor: simplify protected route component --- Client/src/Components/ProtectedRoute/index.jsx | 18 +++++++++--------- Client/src/Routes/index.jsx | 6 +++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Client/src/Components/ProtectedRoute/index.jsx b/Client/src/Components/ProtectedRoute/index.jsx index 1a8cf9aa0..7a71aef7e 100644 --- a/Client/src/Components/ProtectedRoute/index.jsx +++ b/Client/src/Components/ProtectedRoute/index.jsx @@ -3,20 +3,20 @@ import { useSelector } from "react-redux"; import PropTypes from "prop-types"; /** - * ProtectedRoute is a higher-order component that wraps the `Route` component from `react-router-dom` - * to create a protected route. It uses Redux to check if the user is authenticated. If the user is - * authenticated, it renders the component passed to it; otherwise, it redirects the user to the login page. + * ProtectedRoute is a wrapper component that ensures only authenticated users + * can access the wrapped content. It checks authentication status (e.g., from Redux or Context). + * If the user is authenticated, it renders the children; otherwise, it redirects to the login page. * * @param {Object} props - The props passed to the ProtectedRoute component. - * @param {React.ComponentType} props.Component - The component to render if the user is authenticated. - * @param {Object} rest - The remaining props passed to the Route component. - * @returns {React.ReactElement} A Route component that conditionally renders the passed Component or redirects to the login page. + * @param {React.ReactNode} props.children - The children to render if the user is authenticated. + * @returns {React.ReactElement} The children wrapped in a protected route or a redirect to the login page. */ -const ProtectedRoute = ({ Component, ...rest }) => { +const ProtectedRoute = ({ children }) => { const authState = useSelector((state) => state.auth); + return authState.authToken ? ( - + children ) : ( { }; ProtectedRoute.propTypes = { - Component: PropTypes.elementType.isRequired, + children: PropTypes.elementType.isRequired, }; export default ProtectedRoute; diff --git a/Client/src/Routes/index.jsx b/Client/src/Routes/index.jsx index ba7822fa7..5fc764b6a 100644 --- a/Client/src/Routes/index.jsx +++ b/Client/src/Routes/index.jsx @@ -35,7 +35,11 @@ const Routes = () => { } + element={ + + + + } > Date: Thu, 12 Dec 2024 22:43:46 +0000 Subject: [PATCH 38/62] fix(deps): update dependency recharts to v2.15.0 --- Client/package-lock.json | 12 ++++++------ Client/package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Client/package-lock.json b/Client/package-lock.json index d60225e07..873588451 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -28,7 +28,7 @@ "react-router": "^6.23.0", "react-router-dom": "^6.23.1", "react-toastify": "^10.0.5", - "recharts": "2.14.1", + "recharts": "2.15.0", "redux-persist": "6.0.0", "vite-plugin-svgr": "^4.2.0" }, @@ -5454,9 +5454,9 @@ } }, "node_modules/recharts": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.14.1.tgz", - "integrity": "sha512-xtWulflkA+/xu4/QClBdtZYN30dbvTHjxjkh5XTMrH/CQ3WGDDPHHa/LLKCbgoqz0z3UaSH2/blV1i6VNMeh1g==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.15.0.tgz", + "integrity": "sha512-cIvMxDfpAmqAmVgc4yb7pgm/O1tmmkl/CjrvXuW+62/+7jj/iF9Ykm+hb/UJt42TREHMyd3gb+pkgoa2MxgDIw==", "license": "MIT", "dependencies": { "clsx": "^2.0.0", @@ -5472,8 +5472,8 @@ "node": ">=14" }, "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/recharts-scale": { diff --git a/Client/package.json b/Client/package.json index a6645fff1..3898b158f 100644 --- a/Client/package.json +++ b/Client/package.json @@ -31,7 +31,7 @@ "react-router": "^6.23.0", "react-router-dom": "^6.23.1", "react-toastify": "^10.0.5", - "recharts": "2.14.1", + "recharts": "2.15.0", "redux-persist": "6.0.0", "vite-plugin-svgr": "^4.2.0" }, From 265f2a7e4a861bb8abd40b0071dd2eb9373f9bd8 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:17:18 -0500 Subject: [PATCH 39/62] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b9565dece..62fea1f77 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +**Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK)** + ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/commit-activity/w/bluewave-labs/bluewave-uptime) From ab0c509c92be5e11b20838625a46c36864268116 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:23:21 -0500 Subject: [PATCH 40/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62fea1f77..d8bc39703 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ See installation instructions in [Checkmate documentation portal](https://bluewa ## 💚 Questions & ideas -We've just launched our [Discussions](https://github.com/bluewave-labs/bluewave-uptime/discussions) page! Feel free to ask questions or share your ideas—we'd love to hear from you! +If you have any questions, suggestions or comments, please use our [Discord channel](https://discord.gg/NAb6H3UTjK). We've also launched our [Discussions](https://github.com/bluewave-labs/bluewave-uptime/discussions) page! Feel free to ask questions or share your ideas—we'd love to hear from you! ## 🧩 Features From b651d097699af1a3c3c025f626bcc64eca0798a5 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 13 Dec 2024 11:20:09 +0800 Subject: [PATCH 41/62] Fix fallback link --- Client/src/Pages/Uptime/Home/fallback.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/Uptime/Home/fallback.jsx b/Client/src/Pages/Uptime/Home/fallback.jsx index 3653160dc..163921501 100644 --- a/Client/src/Pages/Uptime/Home/fallback.jsx +++ b/Client/src/Pages/Uptime/Home/fallback.jsx @@ -41,7 +41,7 @@ const Fallback = ({ isAdmin }) => { variant="contained" color="primary" onClick={() => { - navigate("/monitors/create"); + navigate("/uptime/create"); }} sx={{ mt: theme.spacing(12) }} > From abfd2797070413c20558d0d31cfb1c77876e6b96 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Thu, 12 Dec 2024 23:52:35 -0500 Subject: [PATCH 42/62] Fix wording --- Client/src/Components/TabPanels/Account/ProfilePanel.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Components/TabPanels/Account/ProfilePanel.jsx b/Client/src/Components/TabPanels/Account/ProfilePanel.jsx index 13b16df00..9e7953128 100644 --- a/Client/src/Components/TabPanels/Account/ProfilePanel.jsx +++ b/Client/src/Components/TabPanels/Account/ProfilePanel.jsx @@ -363,7 +363,7 @@ const ProfilePanel = () => { component="p" sx={{ opacity: 0.6 }} > - Note that deleting your account will remove all data from our system. This + Note that deleting your account will remove all data from the server. This is permanent and non-recoverable. From b2f8961bac46112208c112e0cdd863f5c356555d Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 13 Dec 2024 13:19:47 +0000 Subject: [PATCH 43/62] chore(deps): update dependency nodemon to v3.1.9 --- Server/package-lock.json | 14 +++++++------- Server/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..fc10b69f6 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -36,7 +36,7 @@ "chai": "5.1.2", "esm": "3.2.25", "mocha": "11.0.1", - "nodemon": "3.1.7", + "nodemon": "3.1.9", "prettier": "^3.3.3", "sinon": "19.0.2" } @@ -4758,9 +4758,9 @@ } }, "node_modules/nodemon": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", - "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", + "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", "dev": true, "license": "MIT", "dependencies": { @@ -4787,9 +4787,9 @@ } }, "node_modules/nodemon/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/Server/package.json b/Server/package.json index 154f67437..f8a8b5f1a 100644 --- a/Server/package.json +++ b/Server/package.json @@ -39,7 +39,7 @@ "chai": "5.1.2", "esm": "3.2.25", "mocha": "11.0.1", - "nodemon": "3.1.7", + "nodemon": "3.1.9", "prettier": "^3.3.3", "sinon": "19.0.2" } From 7bef37f8c8a51076a5b940fdd05483043d30c1ad Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:11:40 -0500 Subject: [PATCH 44/62] Add coolify option --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8bc39703..1ad7c6672 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Usage instructions can be found [here](https://bluewavelabs.gitbook.io/checkmate ## 🛠️ Installation -See installation instructions in [Checkmate documentation portal](https://bluewavelabs.gitbook.io/checkmate/quickstart). +See installation instructions in [Checkmate documentation portal](https://bluewavelabs.gitbook.io/checkmate/quickstart). Alternatively, you can also use [Coolify](https://coolify.io/) for a one click Docker deployment. ## 💚 Questions & ideas From fb127f5ba280dd8127cbeb9734e7ac4435e7a739 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 13 Dec 2024 17:31:01 +0000 Subject: [PATCH 45/62] fix(deps): update dependency mongoose to v8.9.0 --- Server/package-lock.json | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..f1651cb87 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -660,9 +660,10 @@ } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.7.tgz", - "integrity": "sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz", + "integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==", + "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" } @@ -1169,9 +1170,10 @@ } }, "node_modules/bson": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.7.0.tgz", - "integrity": "sha512-w2IquM5mYzYZv6rs3uN2DZTOBe2a0zXLj53TGDqwF4l6Sz/XsISrisXOJihArF9+BZ6Cq/GjVht7Sjfmri7ytQ==", + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.10.1.tgz", + "integrity": "sha512-P92xmHDQjSKPLHqFxefqMxASNq/aWJMEZugpCjf+AF/pgcUpMMQCg7t7+ewko0/u8AapvF3luf/FoehddEK+sA==", + "license": "Apache-2.0", "engines": { "node": ">=16.20.1" } @@ -3641,7 +3643,8 @@ "node_modules/memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "license": "MIT" }, "node_modules/mensch": { "version": "0.3.4", @@ -4431,13 +4434,13 @@ } }, "node_modules/mongodb": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz", - "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz", + "integrity": "sha512-RM7AHlvYfS7jv7+BXund/kR64DryVI+cHbVAy9P61fnb1RcWZqOW1/Wj2YhqMCx+MuYhqTRGv7AwHBzmsCKBfA==", "license": "Apache-2.0", "dependencies": { - "@mongodb-js/saslprep": "^1.1.5", - "bson": "^6.7.0", + "@mongodb-js/saslprep": "^1.1.9", + "bson": "^6.10.1", "mongodb-connection-string-url": "^3.0.0" }, "engines": { @@ -4445,7 +4448,7 @@ }, "peerDependencies": { "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.1.0", + "@mongodb-js/zstd": "^1.1.0 || ^2.0.0", "gcp-metadata": "^5.2.0", "kerberos": "^2.0.1", "mongodb-client-encryption": ">=6.0.0 <7", @@ -4486,14 +4489,14 @@ } }, "node_modules/mongoose": { - "version": "8.8.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.8.4.tgz", - "integrity": "sha512-yJbn695qCsqDO+xyPII29x2R7flzXhxCDv09mMZPSGllf0sm4jKw3E9s9uvQ9hjO6bL2xjU8KKowYqcY9eSTMQ==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.9.0.tgz", + "integrity": "sha512-b58zY3PLNBcoz6ZXFckr0leJcVVBMAOBvD+7Bj2ZjghAwntXmNnqwlDixTKQU3UYoQIGTv+AQx/0ThsvaeVrCA==", "license": "MIT", "dependencies": { - "bson": "^6.7.0", + "bson": "^6.10.1", "kareem": "2.6.3", - "mongodb": "~6.10.0", + "mongodb": "~6.12.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -6175,6 +6178,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "license": "MIT", "dependencies": { "memory-pager": "^1.0.2" } From 0cfb08d03a51d2dc406db338ada61070bdbf59e1 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:20:33 -0500 Subject: [PATCH 46/62] Mention good-first-issue --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ad7c6672..080efe0d3 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ We pride ourselves on building strong connections with contributors at every lev Here's how you can contribute: 0. Star this repo :) -1. Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). +1. Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag. 2. Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1). We encourage you to copy to your own Figma page, then work on it as it is read-only. 3. Open an issue if you believe you've encountered a bug 4. Check for good-first-issue's if you are a newcomer From 2e970f6f845427915667068538e6700d52766dca Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:18:23 -0500 Subject: [PATCH 47/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 080efe0d3..34f408182 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ If you have any questions, suggestions or comments, please use our [Discord chan ## 🤝 Contributing -We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1500 stars and attracted 35+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! +We pride ourselves on building strong connections with contributors at every level. Despite being a young project, Checkmate has already earned 1900 stars and attracted 35+ contributors from around the globe. So, don’t hold back — jump in, contribute and learn with us! Here's how you can contribute: From 946e74aeab8d4dc53a38e6329e86d1049936ae5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:15:02 +0000 Subject: [PATCH 48/62] chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /Server Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Server/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..60f5718ff 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -4627,9 +4627,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", From 2628f2ae3280fd40dce37158206d1df61d68489e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20=C5=9Ei=C5=9Fmano=C4=9Flu?= Date: Sat, 14 Dec 2024 00:27:26 +0300 Subject: [PATCH 49/62] chore(renovate): Add 'labels' to renovate.json for adding 'dependencies' label on automated PRs --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 5db72dd6a..adfd80a40 100644 --- a/renovate.json +++ b/renovate.json @@ -2,5 +2,6 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:recommended" - ] + ], + "labels": ["dependencies"] } From 7d7c616a739b6e11305fffae052f34064ce03585 Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Fri, 13 Dec 2024 17:56:37 -0500 Subject: [PATCH 50/62] fix: function not called --- Client/src/Pages/AdvancedSettings/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 14ecb6f8f..433829f28 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -18,7 +18,7 @@ import { useIsAdmin } from "../../Hooks/useIsAdmin"; const AdvancedSettings = () => { const navigate = useNavigate(); - const isAdmin = useIsAdmin; + const isAdmin = useIsAdmin(); useEffect(() => { if (!isAdmin) { navigate("/"); From 528bc0b1e0dbc4b9252cb40b9a06dcfac52fec40 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:04:29 -0500 Subject: [PATCH 51/62] Update pull_request_template.md --- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index 55d456545..c6383fbe2 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -8,7 +8,8 @@ Mention the issue number(s) this PR addresses (e.g., #123). ## Please ensure all items are checked off before requesting a review: -- [ ] I have performed a self-review of my code. +- [ ] I deployed the application locally. +- [ ] I have performed a self-review and testing of my code. - [ ] I have included the issue # in the PR. - [ ] I have labelled the PR correctly. - [ ] The issue I am working on is assigned to me. @@ -17,5 +18,3 @@ Mention the issue number(s) this PR addresses (e.g., #123). - [ ] My PR is granular and targeted to one specific feature. - [ ] I took a screenshot or a video and attached to this PR if there is a UI change. - - From ab0d1ab469eb3c91da5d77aee8d09a13f80f5e40 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:04:21 -0500 Subject: [PATCH 52/62] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 34f408182..868689af8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ **Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK)** +**Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** + ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/commit-activity/w/bluewave-labs/bluewave-uptime) From 09644dfcfeafa17faeca8223c9798cfb9c8b1675 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:45:50 -0500 Subject: [PATCH 53/62] Add links to 2 documents for contributors --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 868689af8..1371e203d 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,11 @@ Here's how you can contribute: 0. Star this repo :) 1. Check [Contributor's guideline](https://github.com/bluewave-labs/bluewave-uptime/blob/master/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag. -2. Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1). We encourage you to copy to your own Figma page, then work on it as it is read-only. -3. Open an issue if you believe you've encountered a bug -4. Check for good-first-issue's if you are a newcomer -5. Make a pull request to add new features/make quality-of-life improvements/fix bugs. +2. Optionally, read [project structure](https://bluewavelabs.gitbook.io/checkmate/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview). +3. Have a look at our Figma designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgDUV/Uptime-Genie?node-id=0-1&t=WqOFv9jqNTFGItpL-1) if you are going to use one of our designs. We encourage you to copy to your own Figma page, then work on it as it is read-only. +4. Open an issue if you believe you've encountered a bug. +5. Check for good-first-issue's if you are a newcomer. +6. Make a pull request to add new features/make quality-of-life improvements/fix bugs. From 425358e1e3477f4545658e41ca5aefd6decc83d1 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:12:22 -0500 Subject: [PATCH 54/62] Thank you for 2000 stars! --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1371e203d..5435b3429 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ **Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** +![1](https://github.com/user-attachments/assets/a4f9842e-c9d9-4672-badb-79a5eccbbf3a) + + ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/commit-activity/w/bluewave-labs/bluewave-uptime) From c6ce6274957a80f9de5acd3491d2edd8b7c933ce Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 11:53:53 -0500 Subject: [PATCH 55/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5435b3429..8ef740dbb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -**Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK)** +**Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK) or [Discussions](https://github.com/bluewave-labs/checkmate/discussions) forum.** **Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** From 1b0e7ddd500ce43b402aa8af16af57c7f9d18280 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 14 Dec 2024 21:10:32 +0000 Subject: [PATCH 56/62] fix(deps): update dependency bullmq to v5.34.2 --- Server/package-lock.json | 8 ++++---- Server/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Server/package-lock.json b/Server/package-lock.json index b07bda668..4637f5c81 100644 --- a/Server/package-lock.json +++ b/Server/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "axios": "^1.7.2", "bcrypt": "^5.1.1", - "bullmq": "5.34.0", + "bullmq": "5.34.2", "cors": "^2.8.5", "dockerode": "4.0.2", "dotenv": "^16.4.5", @@ -1221,9 +1221,9 @@ } }, "node_modules/bullmq": { - "version": "5.34.0", - "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.34.0.tgz", - "integrity": "sha512-TyzeYDkIGkooYUn/P1CeiJW3Am1TboC3unwhlg1cJIwKksoyuRp97TkHyCZcwLchXbYCUtsGBZFUYf/lTAhdSg==", + "version": "5.34.2", + "resolved": "https://registry.npmjs.org/bullmq/-/bullmq-5.34.2.tgz", + "integrity": "sha512-eUzeCswrKbQDE1WY8h4ZTBtynOzCU5qx9felFdYOmIJrsy0warDahHKUiCZ6dUCs6ZxYMGtcaciIMcAf1L54yw==", "license": "MIT", "dependencies": { "cron-parser": "^4.6.0", diff --git a/Server/package.json b/Server/package.json index 154f67437..b1fbe27ea 100644 --- a/Server/package.json +++ b/Server/package.json @@ -14,7 +14,7 @@ "dependencies": { "axios": "^1.7.2", "bcrypt": "^5.1.1", - "bullmq": "5.34.0", + "bullmq": "5.34.2", "cors": "^2.8.5", "dockerode": "4.0.2", "dotenv": "^16.4.5", From cd2076ff16dc211fbb1f1956684aaad618fd7855 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:50:03 -0500 Subject: [PATCH 57/62] Update: stress testing for 1000+ servers at the same time --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ef740dbb..1462bbd3a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ Checkmate is an open source uptime manager, server & Docker monitoring tool used to track the operational status and performance of servers and websites. It regularly checks whether a server/website is accessible and performs optimally, providing real-time alerts and reports on the monitored services' availability, downtime, and response time. -Checkmate also has an agent, called [Capture](https://github.com/bluewave-labs/capture), to retrieve data from remote servers. While Capture is not required to run Checkmate, it provides additional insigths about your servers' CPU, RAM, disk and temperature status. +Checkmate also has an agent, called [Capture](https://github.com/bluewave-labs/capture), to retrieve data from remote servers. While Capture is not required to run Checkmate, it provides additional insigths about your servers' CPU, RAM, disk and temperature status. + +We've run stress tests with 1000+ active monitors without any particular issues or performance bottlenecks. We **love** what we are building here, and learn a few things about Reactjs, Nodejs, MongoDB and Docker while building Checkmate. **If you would like to support us, please consider giving it a ⭐, think about contributing or providing feedback.** Please note that we do not operate a monetary donation program, make money by deploying servers, or run a SaaS business. From a0289d1893fee018fbe6a06d0b56b75d3bc2f0a8 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:55:51 -0500 Subject: [PATCH 58/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1462bbd3a..92866185f 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ If you have any questions, suggestions or comments, please use our [Discord chan - Incidents at a glance - E-mail notifications - Scheduled maintenance +- Can monitor 1000+ servers at the same time on a moderate server **Short term roadmap:** From 7cbeb7518671342b4cbadad5f6e9c2c545f45b0d Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sun, 15 Dec 2024 14:45:57 -0500 Subject: [PATCH 59/62] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 92866185f..9e99985c4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ **Need support or have a suggestion? Check our [Discord channel](https://discord.gg/NAb6H3UTjK) or [Discussions](https://github.com/bluewave-labs/checkmate/discussions) forum.** -**Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13!** - -![1](https://github.com/user-attachments/assets/a4f9842e-c9d9-4672-badb-79a5eccbbf3a) +**Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13th & 15th** +2300 ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) From 265af611006ab53f54e3ce0721998dd40173a9c2 Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:09:33 -0500 Subject: [PATCH 60/62] Add a warning line in pull_request_template.md --- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index c6383fbe2..b966a8cc6 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -1,6 +1,8 @@ +**(when sending your PR, only remove this line. Do not remove any lines below. Check all the items before sending your PR)** + ## Describe your changes -Briefly describe the changes you made and their purpose. +Briefly describe the changes you made and their purpose. ## Issue number From 37f74271aaa33aa0b9cdbbb53b3a342a3b4e146e Mon Sep 17 00:00:00 2001 From: "Gorkem Cetin (BWL)" <167266851+gorkem-bwl@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:24:39 -0500 Subject: [PATCH 61/62] 2500 * --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e99985c4..99600f617 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Checkmate is on [GitHub trending](https://github.com/trending) and #1 trending for JavaScript apps on Fri Dec 13th & 15th** -2300 +Frame 34 ![](https://img.shields.io/github/license/bluewave-labs/bluewave-uptime) ![](https://img.shields.io/github/repo-size/bluewave-labs/bluewave-uptime) From 69ef798f603154597d70b0a11d6827edf192e260 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 16 Dec 2024 16:57:03 +0000 Subject: [PATCH 62/62] chore(deps): update dependency @types/react to v18.3.17 --- Client/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/package-lock.json b/Client/package-lock.json index dfc221fc4..603e30ae0 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -2372,9 +2372,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.16", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.16.tgz", - "integrity": "sha512-oh8AMIC4Y2ciKufU8hnKgs+ufgbA/dhPTACaZPM86AbwX9QwnFtSoPWEeRUj8fge+v6kFt78BXcDhAU1SrrAsw==", + "version": "18.3.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.17.tgz", + "integrity": "sha512-opAQ5no6LqJNo9TqnxBKsgnkIYHozW9KSTlFVoSUJYh1Fl/sswkEoqIugRSm7tbh6pABtYjGAjW+GOS23j8qbw==", "license": "MIT", "dependencies": { "@types/prop-types": "*",