This commit is contained in:
Alex Holliday committed 2025-12-30 21:50:38 +00:00
1 parent 8b079905a3
commit 5c9d6b5523
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -39,7 +39,7 @@ export interface LatestCheck {
responseTime: number;
checkedAt: Date;
// Snapshot of containers from the latest docker check (array from payload.data)
containerSnapshot?: IDockerContainerSummary[];
dockerContainers?: IDockerContainerSummary[];
}
export interface IMonitor extends Document {
_id: Types.ObjectId;
@@ -108,7 +108,7 @@ const MonitorSchema = new Schema<IMonitor>(
},
responseTime: { type: Number, required: true },
checkedAt: { type: Date, required: true },
containerSnapshot: {
dockerContainers: {
type: [
{
container_id: { type: String },
@@ -83,7 +83,7 @@ class StatusService implements IStatusService {
// If this is a docker type, add the snapshot
if (monitor.type === "docker") {
const payload: any = statusResponse.payload;
nextCheck.containerSnapshot = payload.data;
nextCheck.dockerContainers = payload.data;
}
monitor.latestChecks.push(nextCheck);