update check and monitor domains
This commit is contained in:
1 parent
9c8bf4bb05
commit
686ded2137
7 files changed
+87
-2
No files matched your search
@@ -2,7 +2,7 @@ import { Types } from "mongoose";
|
||||
import { IChecksRepository } from "@/domain/checks/check.repository.interface.js";
|
||||
import { IMonitorsRepository } from "@/domain/monitors/monitor.repository.interface.js";
|
||||
import type { Check, CheckErrorInfo, ChecksQueryResult, ChecksSummary, ILighthouseAudit } from "@/domain/checks/check.type.js";
|
||||
import type { MonitorPayloadMap, MonitorStatusResponse } from "@/types/network.js";
|
||||
import type { DockerStatusPayload, MonitorPayloadMap, MonitorStatusResponse } from "@/types/network.js";
|
||||
import type { HardwareStatusPayload, PageSpeedStatusPayload } from "@/types/network.js";
|
||||
import { AppError } from "@/utils/AppError.js";
|
||||
import { ILogger } from "@/utils/logger.js";
|
||||
@@ -131,6 +131,12 @@ export class CheckService implements ICheckService {
|
||||
check.capture = hardwarePayload?.capture;
|
||||
check.net = net;
|
||||
}
|
||||
|
||||
if (type === "docker") {
|
||||
const dockerPayload = payload as DockerStatusPayload | undefined;
|
||||
check.containers = dockerPayload?.containers;
|
||||
check.containerSummary = dockerPayload?.summary;
|
||||
}
|
||||
return check;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user