-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/infra monitor details request #1177
Changes from all commits
ec1563b
69281eb
6363fa7
f90208b
6dab90f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Yo, we got a schema mismatch that's heavier than mom's spaghetti! 🍝 The verification confirms inconsistency in dateRange validation across different endpoints:
These endpoints are actively used in their respective controllers and the validation mismatch could cause confusion. Either:
• Server/validation/joi.js: Update 🔗 Analysis chainYo dawg, the change looks good but we got some consistency issues! 🍝 The addition of "all" as a valid dateRange option aligns with the PR objectives. However, other validation schemas that use dateRange haven't been updated to include this option. Let's check for potential impacts: Consider updating these schemas for consistency:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Find all validation schemas using dateRange to ensure consistency
# Search for validation schemas with dateRange
echo "Searching for validation schemas with dateRange..."
rg -B 2 -A 2 'dateRange:\s*joi\.string\(\)\.valid\('
# Search for usages of these validation schemas
echo "Searching for API endpoints using these schemas..."
rg -l 'getMonitorStatsByIdQueryValidation|getChecksQueryValidation|getTeamChecksQueryValidation'
Length of output: 1758 Script: #!/bin/bash
# Let's check how these validation schemas are actually used in the controllers
echo "Checking monitor controller usage..."
rg -B 3 -A 3 'getMonitorStatsByIdQueryValidation' Server/controllers/monitorController.js
echo "\nChecking check controller usage..."
rg -B 3 -A 3 'getChecksQueryValidation|getTeamChecksQueryValidation' Server/controllers/checkController.js
Length of output: 1689 |
||
numToDisplay: joi.number(), | ||
normalize: joi.boolean(), | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yo dawg, your useEffect's dependency array is emptier than mom's spaghetti!
The dateRange state is initialized but changes to it won't trigger a data refetch because it's not included in the useEffect's dependency array.
Add dateRange to the dependency array: