From 6c2298b976b0fdd7e41b7dcee838a603f5f0ea40 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 31 Jan 2025 07:32:49 -0800 Subject: [PATCH 1/3] add empty view for uptime details --- Client/src/Pages/Uptime/Details/index.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Client/src/Pages/Uptime/Details/index.jsx b/Client/src/Pages/Uptime/Details/index.jsx index 33583b0cb..e8311ebb1 100644 --- a/Client/src/Pages/Uptime/Details/index.jsx +++ b/Client/src/Pages/Uptime/Details/index.jsx @@ -6,8 +6,9 @@ import ChartBoxes from "./Components/ChartBoxes"; import ResponseTimeChart from "./Components/Charts/ResponseTimeChart"; import ResponseTable from "./Components/ResponseTable"; import UptimeStatusBoxes from "./Components/UptimeStatusBoxes"; +import GenericFallback from "../../../Components/GenericFallback"; // MUI Components -import { Stack } from "@mui/material"; +import { Stack, Typography } from "@mui/material"; // Utils import { useState } from "react"; @@ -77,6 +78,14 @@ const UptimeDetails = () => { setRowsPerPage(event.target.value); }; + if (!monitorIsLoading && !checksAreLoading && checksCount === 0) { + return ( + + There is no history for this monitor yet. + + ); + } + return ( From 9515477fd7b440e127fa6bc1fe07435c1200cb42 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 31 Jan 2025 10:12:06 -0800 Subject: [PATCH 2/3] Add header to empty view --- Client/src/Pages/Uptime/Details/index.jsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Client/src/Pages/Uptime/Details/index.jsx b/Client/src/Pages/Uptime/Details/index.jsx index e8311ebb1..335b173ef 100644 --- a/Client/src/Pages/Uptime/Details/index.jsx +++ b/Client/src/Pages/Uptime/Details/index.jsx @@ -78,11 +78,21 @@ const UptimeDetails = () => { setRowsPerPage(event.target.value); }; + // Empty view, displayed when loading is complete and there are no checks if (!monitorIsLoading && !checksAreLoading && checksCount === 0) { return ( - - There is no history for this monitor yet. - + + + + + There is no history for this monitor yet. + + ); } @@ -90,6 +100,7 @@ const UptimeDetails = () => { Date: Fri, 31 Jan 2025 10:14:43 -0800 Subject: [PATCH 3/3] remove console log --- Client/src/Pages/Uptime/Monitors/index.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Client/src/Pages/Uptime/Monitors/index.jsx b/Client/src/Pages/Uptime/Monitors/index.jsx index 962530d41..0784b46a8 100644 --- a/Client/src/Pages/Uptime/Monitors/index.jsx +++ b/Client/src/Pages/Uptime/Monitors/index.jsx @@ -112,7 +112,6 @@ const UptimeMonitors = () => { if (networkError) { return ( - {" "} { /> ); } - console.log({ isLoading }); return (