diff --git a/client/src/Components/Charts/StatusPageBarChart/index.jsx b/client/src/Components/Charts/StatusPageBarChart/index.jsx
index e8a34806d..eab0c7d1d 100644
--- a/client/src/Components/Charts/StatusPageBarChart/index.jsx
+++ b/client/src/Components/Charts/StatusPageBarChart/index.jsx
@@ -1,7 +1,7 @@
import { useTheme } from "@emotion/react";
import { Box, Stack, Tooltip, Typography } from "@mui/material";
import { formatDateWithTz } from "../../../Utils/timeUtils";
-import { useEffect, useState } from "react";
+import { useEffect, useState, forwardRef } from "react";
import { useSelector } from "react-redux";
import PropTypes from "prop-types";
@@ -17,23 +17,29 @@ import PropTypes from "prop-types";
* @returns {JSX.Element} The Bar component.
*/
-const Bar = ({ width, height, backgroundColor, borderRadius, children }) => {
- const theme = useTheme();
+const Bar = forwardRef(
+ ({ width, height, backgroundColor, borderRadius, children, ...otherProps }, ref) => {
+ const theme = useTheme();
- return (
-
- {children}
-
- );
-};
+ return (
+
+ {children}
+
+ );
+ }
+);
+
+Bar.displayName = "Bar";
Bar.propTypes = {
width: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
diff --git a/client/src/Pages/StatusPage/Status/Components/MonitorsList/index.jsx b/client/src/Pages/StatusPage/Status/Components/MonitorsList/index.jsx
index 1097cf1da..545974c57 100644
--- a/client/src/Pages/StatusPage/Status/Components/MonitorsList/index.jsx
+++ b/client/src/Pages/StatusPage/Status/Components/MonitorsList/index.jsx
@@ -11,7 +11,12 @@ import PropTypes from "prop-types";
import { useSelector } from "react-redux";
-const MonitorsList = ({ isLoading = false, shouldRender = true, monitors = [] }) => {
+const MonitorsList = ({
+ isLoading = false,
+ shouldRender = true,
+ monitors = [],
+ statusPage = {},
+}) => {
const theme = useTheme();
const { determineState } = useMonitorUtils();
@@ -40,10 +45,12 @@ const MonitorsList = ({ isLoading = false, shouldRender = true, monitors = [] })
alignItems="center"
gap={theme.spacing(20)}
>
-
-
-
-
+ {statusPage.showCharts !== false && (
+
+
+
+ )}
+
{
/>
{t("statusPageStatusServiceStatus")}
-
+
{link}
);
diff --git a/server/src/db/mongo/modules/statusPageModule.js b/server/src/db/mongo/modules/statusPageModule.js
index 10710d0f7..aadde0c81 100755
--- a/server/src/db/mongo/modules/statusPageModule.js
+++ b/server/src/db/mongo/modules/statusPageModule.js
@@ -162,6 +162,14 @@ class StatusPageModule {
as: "monitors.checks",
},
},
+ {
+ $lookup: {
+ from: "monitorstats",
+ localField: "monitors._id",
+ foreignField: "monitorId",
+ as: "monitors.stats",
+ },
+ },
{
$addFields: {
"monitors.orderIndex": {
@@ -181,6 +189,9 @@ class StatusPageModule {
},
},
},
+ "monitors.uptimePercentage": {
+ $arrayElemAt: ["$monitors.stats.uptimePercentage", 0],
+ },
},
},
{ $match: { "monitors.orderIndex": { $ne: -1 } } },