fix pretty name bug, ordering bug

This commit is contained in:
Alex Holliday committed 2026-08-04 14:46:52 -07:00
1 parent dfcb3b4b21
commit 4c8342f379
8 files changed
+22 -17

No files matched your search

@@ -81,6 +81,7 @@ class MongoChecksRepository implements IChecksRepository {
os: host?.os ?? "",
platform: host?.platform ?? "",
kernel_version: host?.kernel_version ?? "",
pretty_name: host?.pretty_name ?? "",
});
const mapCapture = (capture?: CheckCaptureInfo): CheckCaptureInfo => ({
@@ -363,7 +363,7 @@ export class MonitorService implements IMonitorService {
const monitorsWithChecks = monitors.map((monitor: Monitor) => {
const rawChecks = monitor.recentChecks ?? [];
const isSnapshotType = snapshotOnlyRequest || snapshotTypes.includes(monitor.type);
const checks = isSnapshotType ? rawChecks.slice(0, 1) : rawChecks;
const checks = isSnapshotType ? rawChecks.slice(-1) : rawChecks;
monitor.recentChecks = checks;
return monitor;
});