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:
2 files changed
+6
-1
No files matched your search
@@ -39,6 +39,8 @@ export const NormalizeData = (checks, rangeMin, rangeMax) => {
|
|||||||
|
|
||||||
return normalizedChecks;
|
return normalizedChecks;
|
||||||
} else {
|
} else {
|
||||||
return checks;
|
return checks.map((check) => {
|
||||||
|
return { ...check, originalResponseTime: check.responseTime };
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -124,6 +124,9 @@ const DetailsPage = () => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (latestDownCheck === 0) {
|
||||||
|
return Date.now() - new Date(checks[checks.length - 1].createdAt);
|
||||||
|
}
|
||||||
return latestCheck - latestDownCheck;
|
return latestCheck - latestDownCheck;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user