diff --git a/StatusPage/src/Pages/Overview/Overview.tsx b/StatusPage/src/Pages/Overview/Overview.tsx index 0a35b1699c..409283456f 100644 --- a/StatusPage/src/Pages/Overview/Overview.tsx +++ b/StatusPage/src/Pages/Overview/Overview.tsx @@ -725,13 +725,27 @@ const Overview: FunctionComponent = ( getResourcesInGroup(group); for (const resource of resourcesInGroup) { - let currentMonitorStatus: MonitorStatus | undefined = - monitorStatuses.find((status: MonitorStatus) => { + let currentMonitorStatus: MonitorStatus | undefined = undefined; + + if (resource.monitor) { + currentMonitorStatus = monitorStatuses.find((status: MonitorStatus) => { return ( status._id?.toString() === resource.monitor?.currentMonitorStatusId?.toString() ); }); + } + + if (resource.monitorGroupId) { + currentMonitorStatus = monitorStatuses.find((status: MonitorStatus) => { + return ( + status._id?.toString() === + monitorGroupCurrentStatuses[ + resource.monitorGroupId?.toString() || "" + ]?.toString() + ); + }); + } if (!currentMonitorStatus) { currentMonitorStatus = currentStatus;