Merge pull request #378 from bluewave-labs/fix/monitor-uptime-calculation

Fixed uptime duration calculation, added original response time to ch…
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-07-18 14:41:19 -07:00
commit eb7ded169c
2 files changed
+6 -1

No files matched your search

+3 -1
View File
@@ -39,6 +39,8 @@ export const NormalizeData = (checks, rangeMin, rangeMax) => {
return normalizedChecks;
} else {
return checks;
return checks.map((check) => {
return { ...check, originalResponseTime: check.responseTime };
});
}
};
@@ -124,6 +124,9 @@ const DetailsPage = () => {
break;
}
}
if (latestDownCheck === 0) {
return Date.now() - new Date(checks[checks.length - 1].createdAt);
}
return latestCheck - latestDownCheck;
};