-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(api): Add relative stats period support to get_date_range_from_params #11380
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
Conversation
Extract common components and functions from the organization and project release overview pages. Depends on #11380
src/sentry/api/utils.py
Outdated
| delta = end - start | ||
| if delta < MIN_STATS_PERIOD or delta > MAX_STATS_PERIOD: | ||
| raise InvalidParams( | ||
| 'Time window must be greater than an hour and less than or equal to 90 days') |
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.
Might make sense to make this string dynamic so that it doesn't break if we change min/max period
| assert end is None | ||
|
|
||
| @freeze_time('2018-12-11 03:21:34') | ||
| def test_relative_date_range(self): |
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.
Could be worth testing having statsPeriod(Start|End) missing
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.
done
Extract common components and functions from the organization and project release overview pages. Depends on #11380
aac8851 to
f85c5fc
Compare
Extract common components and functions from the organization and project release overview pages. Depends on #11380
Extract common components and functions from the organization and project release overview pages. Depends on #11380
* master: (56 commits) feat(issues) Add skeleton for Org wide issues (#11420) fix(api): Fix broken spam email blocking code don't need this white background anymore and it causes a bug on hosted setup (#11436) fix(charts): Fix max value for WorldMapChart (#11404) feat(issues): Add issues icon to sidebar (#11439) build: Remove 'exports' from sourcemaps sources prefix (#11438) fix: Render integration description as markdown in search (#11441) ref: Import jquery when it's used (#11430) fix(ui): Render message params (#11432) ref(releases): Refactor projects/organization release overview (#11392) ref(groups): Refactor project group details (#11422) feat(2fa): Allow org to reset member 2fa (#11152) feat(api): Add relative stats period support to get_date_range_from_params (#11380) chore: Remove group-unmerge flag (#11431) fix(ui) Fix 'other' tag bucket to have a proper tooltip (#11433) build(dev): Add `yarn dev` script to start sentry devserver (#11360) ref(charts): Change PercentageBarChart -> PercentageAreaChart (#11401) feat(discover): Zerofill queries that are grouped by time (#11384) test: Add coverage for breadcrumb message scrubbing feat(releases): Add all organization release routes (#11377) ...
going to refactor the discover endpoint to use this too (since that's where @billyvg needs it)