From 6d3ed27f317289a60988904e5922e561120c040c Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 19 Aug 2024 10:02:12 -0700 Subject: [PATCH] Parsed mongo doc correctly in Normalization function --- Client/src/Pages/Monitors/Details/index.jsx | 1 - Server/db/mongo/modules/monitorModule.js | 1 - Server/utils/dataUtils.js | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Client/src/Pages/Monitors/Details/index.jsx b/Client/src/Pages/Monitors/Details/index.jsx index 79fba3b6b..b64398f4e 100644 --- a/Client/src/Pages/Monitors/Details/index.jsx +++ b/Client/src/Pages/Monitors/Details/index.jsx @@ -16,7 +16,6 @@ import { formatDurationRounded, } from "../../../Utils/timeUtils"; import "./index.css"; -import MonitorDetails60MinChart from "../../../Components/Charts/MonitorDetails60MinChart"; import Breadcrumbs from "../../../Components/Breadcrumbs"; const StatBox = ({ title, value }) => { diff --git a/Server/db/mongo/modules/monitorModule.js b/Server/db/mongo/modules/monitorModule.js index 0fc56c755..d99de3e01 100644 --- a/Server/db/mongo/modules/monitorModule.js +++ b/Server/db/mongo/modules/monitorModule.js @@ -260,7 +260,6 @@ const getMonitorStatsById = async (req) => { monitorStats.latestResponseTime = getLatestResponseTime(checksAll); monitorStats.incidents = incidents; monitorStats.checks = dateRangeChecks; - return monitorStats; } catch (error) { console.log(error); diff --git a/Server/utils/dataUtils.js b/Server/utils/dataUtils.js index f1c4b39b2..b1180802b 100644 --- a/Server/utils/dataUtils.js +++ b/Server/utils/dataUtils.js @@ -40,7 +40,7 @@ const NormalizeData = (checks, rangeMin, rangeMax) => { return normalizedChecks; } else { return checks.map((check) => { - return { ...check, originalResponseTime: check.responseTime }; + return { ...check._doc, originalResponseTime: check.responseTime }; }); } };