This commit is contained in:
Alex Holliday committed 2026-01-14 23:34:05 +00:00
1 parent b1b27be731
commit cdbaad5bd9
7 files changed
+72 -42

No files matched your search

@@ -47,7 +47,7 @@ export interface IMonitorService {
field?: string;
order?: "asc" | "desc";
explain?: boolean;
}): Promise<{ count: number; monitors: any[] }>;
}): Promise<{ summary: any; count: number; monitors: any[] }>;
getAllGames(): any;
getGroupsByTeamId(args: { teamId: string }): Promise<any[]>;
@@ -399,7 +399,8 @@ export class MonitorService implements IMonitorService {
field?: string;
order?: "asc" | "desc";
explain?: boolean;
}): Promise<{ count: number; monitors: any[] }> => {
}): Promise<{ summary: any; count: number; monitors: any[] }> => {
const summary = await this.monitorsRepository.findMonitorsSummaryByTeamId(teamId);
const count = await this.monitorsRepository.findMonitorCountByTeamIdAndType(teamId, { type, filter });
const monitors = await this.monitorsRepository.findByTeamId(teamId, {
limit,
@@ -433,7 +434,7 @@ export class MonitorService implements IMonitorService {
};
});
return { count, monitors: monitorsWithChecks };
return { summary: summary ?? null, count, monitors: monitorsWithChecks };
};
getAllGames = (): any => {
@@ -5,15 +5,6 @@ const SERVICE_NAME = "StatusService";
class StatusService {
static SERVICE_NAME = SERVICE_NAME;
/**
* @param {{
* db: any
* logger: any
* buffer: import("./bufferService.js").BufferService
* incidentService: import("../business/incidentService.js").IncidentService
* monitorsRepository: any
* }}
*/
constructor({ db, logger, buffer, incidentService, monitorsRepository }) {
this.db = db;
this.logger = logger;