Merge pull request #1177 from bluewave-labs/feat/infras-monitor-details-request

feat/infra monitor details request
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-11-24 18:28:14 -08:00
commit 260214808c
4 files changed
+17 -7

No files matched your search

+2 -1
View File
@@ -198,7 +198,7 @@ const getIncidents = (checks) => {
/**
* Get date range parameters
* @param {string} dateRange - 'day' | 'week' | 'month'
* @param {string} dateRange - 'day' | 'week' | 'month' | 'all'
* @returns {Object} Start and end dates
*/
const getDateRange = (dateRange) => {
@@ -206,6 +206,7 @@ const getDateRange = (dateRange) => {
day: new Date(new Date().setDate(new Date().getDate() - 1)),
week: new Date(new Date().setDate(new Date().getDate() - 7)),
month: new Date(new Date().setMonth(new Date().getMonth() - 1)),
all: new Date(0),
};
return {
start: startDates[dateRange],
+1 -1
View File
@@ -178,7 +178,7 @@ const getMonitorStatsByIdQueryValidation = joi.object({
status: joi.string(),
limit: joi.number(),
sortOrder: joi.string().valid("asc", "desc"),
dateRange: joi.string().valid("day", "week", "month"),
dateRange: joi.string().valid("day", "week", "month", "all"),
numToDisplay: joi.number(),
normalize: joi.boolean(),
});