update status page
This commit is contained in:
1 parent
7ea0e0134c
commit
28a9707885
1 file changed
+51
-11
@@ -12,9 +12,14 @@ import MonitorTimeFrameHeader from "../../../Components/MonitorTimeFrameHeader";
|
|||||||
import GenericFallback from "../../../Components/GenericFallback";
|
import GenericFallback from "../../../Components/GenericFallback";
|
||||||
import Dialog from "../../../Components/Dialog";
|
import Dialog from "../../../Components/Dialog";
|
||||||
import SkeletonLayout from "./Components/Skeleton";
|
import SkeletonLayout from "./Components/Skeleton";
|
||||||
|
import UptLogo from "../../../assets/icons/upt_logo.png";
|
||||||
|
import PeopleAltOutlinedIcon from "@mui/icons-material/PeopleAltOutlined";
|
||||||
|
import InfoBox from "../../../Components/InfoBox";
|
||||||
|
import StatusHeader from "../../DistributedUptime/Details/Components/StatusHeader";
|
||||||
|
|
||||||
//Utils
|
//Utils
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { useState } from "react";
|
import { useState, useRef } from "react";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import { useSubscribeToDetails } from "../../DistributedUptime/Details/Hooks/useSubscribeToDetails";
|
import { useSubscribeToDetails } from "../../DistributedUptime/Details/Hooks/useSubscribeToDetails";
|
||||||
import { useStatusPageFetchByUrl } from "./Hooks/useStatusPageFetchByUrl";
|
import { useStatusPageFetchByUrl } from "./Hooks/useStatusPageFetchByUrl";
|
||||||
@@ -26,6 +31,7 @@ const DistributedUptimeStatus = () => {
|
|||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const isPublic = location.pathname.startsWith("/status/distributed/public");
|
const isPublic = location.pathname.startsWith("/status/distributed/public");
|
||||||
|
|
||||||
|
const elementToCapture = useRef(null);
|
||||||
// Local State
|
// Local State
|
||||||
const [dateRange, setDateRange] = useState("day");
|
const [dateRange, setDateRange] = useState("day");
|
||||||
const [isDeleteOpen, setIsDeleteOpen] = useState(false);
|
const [isDeleteOpen, setIsDeleteOpen] = useState(false);
|
||||||
@@ -130,9 +136,12 @@ const DistributedUptimeStatus = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
|
ref={elementToCapture}
|
||||||
direction="column"
|
direction="column"
|
||||||
gap={theme.spacing(10)}
|
gap={theme.spacing(10)}
|
||||||
sx={sx}
|
sx={{
|
||||||
|
...sx,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{!isPublic && <Breadcrumbs list={BREADCRUMBS} />}
|
{!isPublic && <Breadcrumbs list={BREADCRUMBS} />}
|
||||||
<ControlsHeader
|
<ControlsHeader
|
||||||
@@ -144,10 +153,13 @@ const DistributedUptimeStatus = () => {
|
|||||||
url={url}
|
url={url}
|
||||||
type="distributed"
|
type="distributed"
|
||||||
/>
|
/>
|
||||||
<StatBoxes
|
|
||||||
|
<StatusHeader
|
||||||
monitor={monitor}
|
monitor={monitor}
|
||||||
lastUpdateTrigger={lastUpdateTrigger}
|
connectionStatus={connectionStatus}
|
||||||
|
elementToCapture={elementToCapture}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NextExpectedCheck
|
<NextExpectedCheck
|
||||||
lastUpdateTime={monitor?.timeSinceLastCheck ?? 0}
|
lastUpdateTime={monitor?.timeSinceLastCheck ?? 0}
|
||||||
interval={monitor?.interval ?? 0}
|
interval={monitor?.interval ?? 0}
|
||||||
@@ -157,7 +169,6 @@ const DistributedUptimeStatus = () => {
|
|||||||
dateRange={dateRange}
|
dateRange={dateRange}
|
||||||
setDateRange={setDateRange}
|
setDateRange={setDateRange}
|
||||||
/>
|
/>
|
||||||
<DistributedUptimeResponseChart checks={monitor?.groupedChecks ?? []} />
|
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
gap={theme.spacing(8)}
|
gap={theme.spacing(8)}
|
||||||
@@ -165,14 +176,43 @@ const DistributedUptimeStatus = () => {
|
|||||||
<DistributedUptimeMap
|
<DistributedUptimeMap
|
||||||
checks={monitor?.groupedMapChecks ?? []}
|
checks={monitor?.groupedMapChecks ?? []}
|
||||||
height={"100%"}
|
height={"100%"}
|
||||||
width={"100%"}
|
width={"50%"}
|
||||||
/>
|
|
||||||
<DeviceTicker
|
|
||||||
width={"25vw"}
|
|
||||||
data={monitor?.latestChecks ?? []}
|
|
||||||
connectionStatus={connectionStatus}
|
|
||||||
/>
|
/>
|
||||||
|
<Stack
|
||||||
|
width={"50%"}
|
||||||
|
gap={theme.spacing(8)}
|
||||||
|
>
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={theme.spacing(8)}
|
||||||
|
>
|
||||||
|
<InfoBox
|
||||||
|
heading="Devices"
|
||||||
|
subHeading={monitor?.totalChecks ?? 0}
|
||||||
|
icon={PeopleAltOutlinedIcon}
|
||||||
|
alt="Upt Logo"
|
||||||
|
sx={{ width: "50%" }}
|
||||||
|
/>
|
||||||
|
<InfoBox
|
||||||
|
heading="UPT Burned"
|
||||||
|
subHeading={monitor?.totalUptBurnt ?? 0}
|
||||||
|
img={UptLogo}
|
||||||
|
alt="Upt Logo"
|
||||||
|
sx={{ width: "50%" }}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
<DeviceTicker
|
||||||
|
data={monitor?.latestChecks ?? []}
|
||||||
|
connectionStatus={connectionStatus}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<DistributedUptimeResponseChart checks={monitor?.groupedChecks ?? []} />
|
||||||
|
<StatBoxes
|
||||||
|
monitor={monitor}
|
||||||
|
lastUpdateTrigger={lastUpdateTrigger}
|
||||||
|
/>
|
||||||
<Footer />
|
<Footer />
|
||||||
<Dialog
|
<Dialog
|
||||||
// open={isOpen.deleteStats}
|
// open={isOpen.deleteStats}
|
||||||
|
|||||||
Reference in new issue
Block a user