Compare commits

..
2 Commits
Author SHA1 Message Date
Alexander Holliday c8d3e3b70c Merge pull request #2921 from bluewave-labs/develop
develop -> master
2025-09-04 15:46:30 -07:00
Alexander Holliday 7a90a6f9f4 Merge pull request #2915 from bluewave-labs/develop
develop->master
2025-09-01 10:33:09 -07:00
13 changed files with 24 additions and 90 deletions

No files matched your search

@@ -1,7 +1,7 @@
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { Box, Stack, Tooltip, Typography } from "@mui/material"; import { Box, Stack, Tooltip, Typography } from "@mui/material";
import { formatDateWithTz } from "../../../Utils/timeUtils"; import { formatDateWithTz } from "../../../Utils/timeUtils";
import { useEffect, useState, forwardRef } from "react"; import { useEffect, useState } from "react";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
@@ -17,29 +17,23 @@ import PropTypes from "prop-types";
* @returns {JSX.Element} The Bar component. * @returns {JSX.Element} The Bar component.
*/ */
const Bar = forwardRef( const Bar = ({ width, height, backgroundColor, borderRadius, children }) => {
({ width, height, backgroundColor, borderRadius, children, ...otherProps }, ref) => { const theme = useTheme();
const theme = useTheme();
return ( return (
<Box <Box
ref={ref} width={width}
position="relative" position="relative"
width={width} height={height}
height={height} backgroundColor={backgroundColor}
backgroundColor={backgroundColor} sx={{
sx={{ borderRadius: borderRadius || theme.spacing(1.5),
borderRadius: borderRadius || theme.spacing(1.5), }}
}} >
{...otherProps} {children}
> </Box>
{children} );
</Box> };
);
}
);
Bar.displayName = "Bar";
Bar.propTypes = { Bar.propTypes = {
width: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired, width: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
@@ -11,12 +11,7 @@ import PropTypes from "prop-types";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
const MonitorsList = ({ const MonitorsList = ({ isLoading = false, shouldRender = true, monitors = [] }) => {
isLoading = false,
shouldRender = true,
monitors = [],
statusPage = {},
}) => {
const theme = useTheme(); const theme = useTheme();
const { determineState } = useMonitorUtils(); const { determineState } = useMonitorUtils();
@@ -45,12 +40,10 @@ const MonitorsList = ({
alignItems="center" alignItems="center"
gap={theme.spacing(20)} gap={theme.spacing(20)}
> >
{statusPage.showCharts !== false && ( <Box flex={9}>
<Box flex={9}> <StatusPageBarChart checks={monitor?.checks?.slice().reverse()} />
<StatusPageBarChart checks={monitor?.checks?.slice().reverse()} /> </Box>
</Box> <Box flex={1}>
)}
<Box flex={statusPage.showCharts !== false ? 1 : 10}>
<StatusLabel <StatusLabel
status={status} status={status}
text={status} text={status}
@@ -67,7 +60,6 @@ const MonitorsList = ({
MonitorsList.propTypes = { MonitorsList.propTypes = {
monitors: PropTypes.array.isRequired, monitors: PropTypes.array.isRequired,
statusPage: PropTypes.object,
}; };
export default MonitorsList; export default MonitorsList;
+1 -4
View File
@@ -154,10 +154,7 @@ const PublicStatus = () => {
/> />
<Typography variant="h2">{t("statusPageStatusServiceStatus")}</Typography> <Typography variant="h2">{t("statusPageStatusServiceStatus")}</Typography>
<StatusBar monitors={monitors} /> <StatusBar monitors={monitors} />
<MonitorsList <MonitorsList monitors={monitors} />
monitors={monitors}
statusPage={statusPage}
/>
{link} {link}
</Stack> </Stack>
); );
+1 -1
View File
@@ -5,7 +5,7 @@ import { execSync } from "child_process";
export default defineConfig(({ mode }) => { export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), ""); const env = loadEnv(mode, process.cwd(), "");
let version = "3.1.7"; let version = "3.1.5";
return { return {
base: "/", base: "/",
-5
View File
@@ -1,10 +1,5 @@
FROM node:20-slim FROM node:20-slim
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app WORKDIR /app
COPY ../../package*.json ./ COPY ../../package*.json ./
-5
View File
@@ -1,10 +1,5 @@
FROM node:20-slim FROM node:20-slim
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app WORKDIR /app
COPY ./server/package*.json ./ COPY ./server/package*.json ./
-5
View File
@@ -3,11 +3,6 @@
# --------------------- # ---------------------
FROM node:24-slim AS frontend-build FROM node:24-slim AS frontend-build
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/client WORKDIR /app/client
COPY client/package.json ./ COPY client/package.json ./
-5
View File
@@ -1,10 +1,5 @@
FROM node:20-slim AS frontend-build FROM node:20-slim AS frontend-build
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/client WORKDIR /app/client
COPY client/package*.json ./ COPY client/package*.json ./
-5
View File
@@ -1,10 +1,5 @@
FROM node:20-slim FROM node:20-slim
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app WORKDIR /app
COPY ./server/package*.json ./ COPY ./server/package*.json ./
-5
View File
@@ -1,10 +1,5 @@
FROM node:20-slim FROM node:20-slim
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_OPTIONS="--max-old-space-size=2048" ENV NODE_OPTIONS="--max-old-space-size=2048"
WORKDIR /app WORKDIR /app
-5
View File
@@ -1,10 +1,5 @@
FROM node:20-slim FROM node:20-slim
# Install ping
RUN apt-get update \
&& apt-get install -y iputils-ping \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_OPTIONS="--max-old-space-size=2048" ENV NODE_OPTIONS="--max-old-space-size=2048"
WORKDIR /app WORKDIR /app
@@ -162,14 +162,6 @@ class StatusPageModule {
as: "monitors.checks", as: "monitors.checks",
}, },
}, },
{
$lookup: {
from: "monitorstats",
localField: "monitors._id",
foreignField: "monitorId",
as: "monitors.stats",
},
},
{ {
$addFields: { $addFields: {
"monitors.orderIndex": { "monitors.orderIndex": {
@@ -189,9 +181,6 @@ class StatusPageModule {
}, },
}, },
}, },
"monitors.uptimePercentage": {
$arrayElemAt: ["$monitors.stats.uptimePercentage", 0],
},
}, },
}, },
{ $match: { "monitors.orderIndex": { $ne: -1 } } }, { $match: { "monitors.orderIndex": { $ne: -1 } } },
@@ -75,9 +75,6 @@ class NetworkService {
const { response, responseTime, error } = await this.timeRequest(() => this.ping.promise.probe(monitor.url)); const { response, responseTime, error } = await this.timeRequest(() => this.ping.promise.probe(monitor.url));
if (!response) { if (!response) {
if (error) {
throw error;
}
throw new Error("Ping failed - no result returned"); throw new Error("Ping failed - no result returned");
} }