Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/src/controllers/statusPageController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class StatusPageController {
const settings = await this.settingsService.getDBSettings();
const showURL = settings.showURL;

const monitors = await this.monitorsRepository.findByIds(statusPage.monitors);
const monitors = await this.monitorsRepository.findByIdsWithChecks(statusPage.monitors);
// Sort monitors according to the order in statusPage.monitors
const monitorOrder = new Map(statusPage.monitors.map((id, index) => [id, index]));
const sortedMonitors = [...monitors].sort((a, b) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ class MongoMonitorsRepository implements IMonitorsRepository {
gameId: doc.gameId ?? undefined,
group: doc.group ?? null,
recentChecks: (doc.recentChecks ?? []).map((check: any) => this.toCheckSnapshot(check)),
isMaintenance: doc.isMaintenance ?? undefined,
createdAt: toDateString(doc.createdAt),
updatedAt: toDateString(doc.updatedAt),
};
Expand Down
1 change: 1 addition & 0 deletions server/src/types/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface Monitor {
gameId?: string;
group: string | null;
recentChecks: CheckSnapshot[];
isMaintenance?: boolean;
createdAt: string;
updatedAt: string;
}
Expand Down