From 69dbc2fe7a19eb25009d5df3171966eae35a0513 Mon Sep 17 00:00:00 2001 From: Sajan Date: Wed, 12 Nov 2025 09:58:38 -0600 Subject: [PATCH] Move up/down chips next to the monitor name --- client/src/Components/v1/Host/index.jsx | 27 +++++++++++++++---- client/src/Components/v1/Label/index.jsx | 6 ++--- .../Status/Components/MonitorsList/index.jsx | 14 ++-------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/client/src/Components/v1/Host/index.jsx b/client/src/Components/v1/Host/index.jsx index 772f5b61c..63ffe8a2c 100644 --- a/client/src/Components/v1/Host/index.jsx +++ b/client/src/Components/v1/Host/index.jsx @@ -2,6 +2,7 @@ import { Stack, Typography } from "@mui/material"; import PropTypes from "prop-types"; import { useTheme } from "@emotion/react"; import Dot from "../Dot/index.jsx"; +import { StatusLabel } from "@/Components/v1/Label/index.jsx"; /** * Host component. * This subcomponent receives a params object and displays the host details. @@ -14,7 +15,7 @@ import Dot from "../Dot/index.jsx"; * @param {number} params.percentage - The percentage to display. * @returns {React.ElementType} Returns a div element with the host details. */ -const Host = ({ url, title, percentageColor, percentage, showURL }) => { +const Host = ({ url, title, percentageColor, percentage, showURL, status }) => { const theme = useTheme(); return ( @@ -22,21 +23,36 @@ const Host = ({ url, title, percentageColor, percentage, showURL }) => { direction="row" position="relative" alignItems="center" - gap={theme.spacing(4)} + gap={theme.spacing(5)} > - {title} + + {title} + + {percentageColor && percentage && ( <> {percentage}% + )} @@ -51,6 +67,7 @@ Host.propTypes = { percentage: PropTypes.string, url: PropTypes.string, showURL: PropTypes.bool, + status: PropTypes.string, }; export default Host; diff --git a/client/src/Components/v1/Label/index.jsx b/client/src/Components/v1/Label/index.jsx index 8c4278fed..2ed9b93bf 100644 --- a/client/src/Components/v1/Label/index.jsx +++ b/client/src/Components/v1/Label/index.jsx @@ -147,11 +147,9 @@ const StatusLabel = ({ status, text, customStyles }) => { }} > ); diff --git a/client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx b/client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx index 0473c5fa5..1628b3d44 100644 --- a/client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx +++ b/client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx @@ -30,7 +30,7 @@ const MonitorsList = ({ @@ -41,6 +41,7 @@ const MonitorsList = ({ percentageColor={monitor.percentageColor} percentage={monitor.percentage} showURL={showURL} + status={status} /> )} - - - );