From 449a1db573592bb9be0905950b943d45c32e35a1 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Fri, 21 Feb 2025 19:34:33 +0000 Subject: [PATCH] feat: add visibility flag for status page in StatusPageAPI --- Common/Server/API/StatusPageAPI.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Common/Server/API/StatusPageAPI.ts b/Common/Server/API/StatusPageAPI.ts index f1b4590de9..a7f3957488 100644 --- a/Common/Server/API/StatusPageAPI.ts +++ b/Common/Server/API/StatusPageAPI.ts @@ -818,6 +818,7 @@ export default class StatusPageAPI extends BaseAPI< currentIncidentStateId: QueryHelper.any( unresolvedIncidentStateIds, ), + isVisibleOnStatusPage: true, projectId: statusPage.projectId!, }, select: select, @@ -962,6 +963,7 @@ export default class StatusPageAPI extends BaseAPI< } as any, statusPages: objectId as any, projectId: statusPage.projectId!, + isVisibleOnStatusPage: true, }, select: scheduledEventsSelect, sort: { @@ -982,6 +984,7 @@ export default class StatusPageAPI extends BaseAPI< } as any, statusPages: objectId as any, projectId: statusPage.projectId!, + isVisibleOnStatusPage: true, }, select: scheduledEventsSelect, sort: { @@ -1427,6 +1430,7 @@ export default class StatusPageAPI extends BaseAPI< startsAt: QueryHelper.inBetween(historyDays, today), statusPages: [statusPageId] as any, projectId: statusPage.projectId!, + isVisibleOnStatusPage: true, }; if (scheduledMaintenanceId) { @@ -1494,6 +1498,7 @@ export default class StatusPageAPI extends BaseAPI< } as any, statusPages: [statusPageId] as any, projectId: statusPage.projectId!, + isVisibleOnStatusPage: true, }, select: scheduledEventsSelect, sort: { @@ -2097,6 +2102,7 @@ export default class StatusPageAPI extends BaseAPI< monitors: monitorsOnStatusPage as any, projectId: statusPage.projectId!, createdAt: QueryHelper.inBetween(historyDays, today), + isVisibleOnStatusPage: true, }; if (incidentId) { @@ -2174,6 +2180,7 @@ export default class StatusPageAPI extends BaseAPI< activeIncidents = await IncidentService.findBy({ query: { monitors: monitorsOnStatusPage as any, + isVisibleOnStatusPage: true, currentIncidentStateId: QueryHelper.any( unresolvbedIncidentStateIds, ),