recent checks
This commit is contained in:
1 parent
5731283c46
commit
6f9fefddd2
7 files changed
+14
-24
No files matched your search
@@ -363,15 +363,10 @@ export class MonitorService implements IMonitorService {
|
||||
const monitorsWithChecks = monitorsList.map((monitor: Monitor) => {
|
||||
const rawChecks = monitor.recentChecks ?? [];
|
||||
const isSnapshotType = snapshotOnlyRequest || snapshotTypes.includes(monitor.type);
|
||||
// recentChecks are stored oldest-first, reverse to get newest-first for display
|
||||
const reversedChecks = [...rawChecks].reverse();
|
||||
const checks = isSnapshotType ? reversedChecks.slice(0, 1) : NormalizeData(reversedChecks, 10, 100);
|
||||
return {
|
||||
...monitor,
|
||||
checks,
|
||||
};
|
||||
const checks = isSnapshotType ? rawChecks.slice(0, 1) : NormalizeData(rawChecks, 10, 100);
|
||||
monitor.recentChecks = checks;
|
||||
return monitor;
|
||||
});
|
||||
|
||||
return { summary: summary ?? null, count, monitors: monitorsWithChecks };
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user