bucket date
This commit is contained in:
1 parent
174665e70a
commit
11c95f885d
8 files changed
+24
-13
No files matched your search
@@ -483,6 +483,7 @@ class MongoChecksRepository implements IChecksRepository {
|
||||
},
|
||||
},
|
||||
{ $sort: { _id: 1 } },
|
||||
{ $project: { bucketDate: "$_id", avgResponseTime: 1, totalChecks: 1, _id: 0 } },
|
||||
],
|
||||
groupedUpChecks: [
|
||||
{ $match: { status: true } },
|
||||
@@ -496,6 +497,7 @@ class MongoChecksRepository implements IChecksRepository {
|
||||
},
|
||||
},
|
||||
{ $sort: { _id: 1 } },
|
||||
{ $project: { bucketDate: "$_id", avgResponseTime: 1, totalChecks: 1, _id: 0 } },
|
||||
],
|
||||
groupedDownChecks: [
|
||||
{ $match: { status: false } },
|
||||
@@ -509,6 +511,7 @@ class MongoChecksRepository implements IChecksRepository {
|
||||
},
|
||||
},
|
||||
{ $sort: { _id: 1 } },
|
||||
{ $project: { bucketDate: "$_id", avgResponseTime: 1, totalChecks: 1, _id: 0 } },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -157,7 +157,7 @@ export interface HardwareChecksResult {
|
||||
}
|
||||
|
||||
export interface GroupedCheck {
|
||||
_id: string;
|
||||
bucketDate: string;
|
||||
avgResponseTime: number;
|
||||
totalChecks: number;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user