Parsed mongo doc correctly in Normalization function
This commit is contained in:
1 parent
b94d93e276
commit
6d3ed27f31
3 files changed
+1
-3
No files matched your search
@@ -16,7 +16,6 @@ import {
|
|||||||
formatDurationRounded,
|
formatDurationRounded,
|
||||||
} from "../../../Utils/timeUtils";
|
} from "../../../Utils/timeUtils";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import MonitorDetails60MinChart from "../../../Components/Charts/MonitorDetails60MinChart";
|
|
||||||
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
import Breadcrumbs from "../../../Components/Breadcrumbs";
|
||||||
|
|
||||||
const StatBox = ({ title, value }) => {
|
const StatBox = ({ title, value }) => {
|
||||||
|
|||||||
@@ -260,7 +260,6 @@ const getMonitorStatsById = async (req) => {
|
|||||||
monitorStats.latestResponseTime = getLatestResponseTime(checksAll);
|
monitorStats.latestResponseTime = getLatestResponseTime(checksAll);
|
||||||
monitorStats.incidents = incidents;
|
monitorStats.incidents = incidents;
|
||||||
monitorStats.checks = dateRangeChecks;
|
monitorStats.checks = dateRangeChecks;
|
||||||
|
|
||||||
return monitorStats;
|
return monitorStats;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const NormalizeData = (checks, rangeMin, rangeMax) => {
|
|||||||
return normalizedChecks;
|
return normalizedChecks;
|
||||||
} else {
|
} else {
|
||||||
return checks.map((check) => {
|
return checks.map((check) => {
|
||||||
return { ...check, originalResponseTime: check.responseTime };
|
return { ...check._doc, originalResponseTime: check.responseTime };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user