mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-01 22:20:03 -05:00
Parsed mongo doc correctly in Normalization function
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 };
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user