diff --git a/src/Components/Subheader/index.jsx b/src/Components/Subheader/index.jsx index cad5c5795..12e802a78 100644 --- a/src/Components/Subheader/index.jsx +++ b/src/Components/Subheader/index.jsx @@ -1,7 +1,6 @@ import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; -import { Box, Stack, Typography } from "@mui/material"; -import { RowContainer } from "../StandardContainer"; +import { Stack, Typography } from "@mui/material"; /** @@ -9,6 +8,7 @@ import { RowContainer } from "../StandardContainer"; * @component * @example * + * @param {string} props.direction - Direction of the subheader * @param {string} props.headerText - Header text * @param {number} props.headerLevel - Font characteristic of the header * @param {string} props.subHeaderText - Subheader text @@ -19,19 +19,22 @@ import { RowContainer } from "../StandardContainer"; */ const SubHeader = ({ + direction = "row", headerText, headerLevel = 1, subHeaderText, subHeaderLevel = 1, alignItems = "center", children, + ...props }) => { const theme = useTheme(); return ( { const theme = useTheme(); + const isSmallScreen = useMediaQuery(theme.breakpoints.down("sm")); + const statusColor = { up: theme.palette.success.main, down: theme.palette.error.main, @@ -43,7 +46,7 @@ const DeviceTicker = ({ data, width = "100%", connectionStatus }) => { RESPONSE - UPT BURNED + {isSmallScreen ? "UPT" : "UPT BURNED"} @@ -68,7 +71,10 @@ const DeviceTicker = ({ data, width = "100%", connectionStatus }) => { - +{dataPoint.uptBurnt} + + + {isSmallScreen + ? safelyParseFloat(dataPoint.uptBurnt).toFixed(4) + : dataPoint.uptBurnt} diff --git a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx index 7617666eb..858eaab78 100644 --- a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx @@ -6,7 +6,12 @@ import maplibregl from "maplibre-gl"; import { useSelector } from "react-redux"; import buildStyle from "./buildStyle"; -const DistributedUptimeMap = ({ width = "100%", checks }) => { +const DistributedUptimeMap = ({ + width = "100%", + checks, + height, + minHeight = "350px", +}) => { const mapContainer = useRef(null); const map = useRef(null); const theme = useTheme(); @@ -92,6 +97,8 @@ const DistributedUptimeMap = ({ width = "100%", checks }) => { ref={mapContainer} style={{ width: width, + height: height, + minHeight: minHeight, borderRadius: theme.spacing(4), borderColor: theme.palette.primary.lowContrast, borderStyle: "solid", @@ -105,6 +112,7 @@ DistributedUptimeMap.propTypes = { checks: PropTypes.array, width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + minHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }; export default DistributedUptimeMap; diff --git a/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx b/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx index df0492bd2..ffc8dbac8 100644 --- a/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx @@ -2,7 +2,6 @@ import { Stack } from "@mui/material"; import InfoBox from "../../../../../Components/InfoBox"; import LastUpdate from "../LastUpdate"; -import UptLogo from "../../../../../assets/icons/upt_logo.png"; // Utils import { useTheme } from "@mui/material/styles"; @@ -15,6 +14,7 @@ const StatBoxes = ({ monitor, lastUpdateTrigger }) => { { return ( diff --git a/src/Pages/DistributedUptimeStatus/Status/Components/TimeframeHeader/index.jsx b/src/Pages/DistributedUptimeStatus/Status/Components/TimeframeHeader/index.jsx index 011f470aa..5ec509376 100644 --- a/src/Pages/DistributedUptimeStatus/Status/Components/TimeframeHeader/index.jsx +++ b/src/Pages/DistributedUptimeStatus/Status/Components/TimeframeHeader/index.jsx @@ -1,13 +1,14 @@ import { Stack, Button, ButtonGroup } from "@mui/material"; -import { RowContainer } from "../../../../../Components/StandardContainer"; import { useTheme } from "@emotion/react"; -const TimeFrameHeader = ({ timeFrame, setTimeFrame }) => { +const TimeFrameHeader = ({ timeFrame, setTimeFrame, sx, ...props }) => { const theme = useTheme(); return (