Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #4956, as suggested in #4956 (comment)
Adds the date range presets next to "Show a view" on the Query page:
Last 30 days (default), Custom, Last 7 days, Last 24 hours, Current month, Previous month, Current week, Previous week, Current day, Yesterday, Current year, Previous year.
Last 30 days is selected at first because it matches the view's default range. Selecting a preset fills in the fields and moves the graph. Editing a field, zooming the graph or restoring a query with "Edit Query" switches the selector to Custom. All data is left out because the view has no all-data range.
Behaviour changes worth checking
timeZoneandtimeZoneOffsetMs, like the date filter options, so presets are calculated in the timezone the server parses the view in.<=instead of<).Locale.ROOT, so servers with a non-Gregorian default locale (for example th-TH) read the dashboard's years correctly.Known limitation
Like the date filter presets, a preset whose start falls in the repeated hour when DST ends can leave out up to one hour, because the
dd/MM/yyyy kk:mmformat can't tell the two occurrences apart.Testing
ViewDtoTest(whole-minute end bound, Gregorian parsing under a th-TH default locale) and a SQLite/MySQL test for a session starting exactly at the view's end.