Fix incorrect uptime check count, refactor out query pipelines

This commit is contained in:
Alex Holliday committed 2025-01-06 14:24:08 -08:00
1 parent 208677f9bc
commit ca42e2608f
3 files changed
+541 -524

No files matched your search

+6 -2
View File
@@ -308,7 +308,9 @@ const DetailsPage = () => {
<Typography component="span">
{hoveredUptimeData !== null
? hoveredUptimeData.totalChecks
: (monitor.stats?.upChecksAggregate?.totalChecks ?? 0)}
: (monitor.stats?.upChecks?.reduce((count, checkGroup) => {
return count + checkGroup.totalChecks;
}, 0) ?? 0)}
</Typography>
{hoveredUptimeData !== null && hoveredUptimeData.time !== null && (
<Typography
@@ -364,7 +366,9 @@ const DetailsPage = () => {
<Typography component="span">
{hoveredIncidentsData !== null
? hoveredIncidentsData.totalChecks
: (monitor.stats?.downChecksAggregate?.totalChecks ?? 0)}
: (monitor.stats?.downChecks?.reduce((count, checkGroup) => {
return count + checkGroup.totalChecks;
}, 0) ?? 0)}
</Typography>
{hoveredIncidentsData !== null &&
hoveredIncidentsData.time !== null && (