Skip to content
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(ui) More reasonable aggregate window intervals for selected query durations #16536

Merged
merged 6 commits into from
Jan 15, 2020

Conversation

ebb-tide
Copy link
Contributor

@ebb-tide ebb-tide commented Jan 14, 2020

Closes #16354

If user selects auto for aggregate window interval, in the Data Explorer or Cell Editor Overlay, the UI calculates an appropriate aggregate window interval for the query duration. The appropriate value is selected so that the UI doesn't request more points than can be displayed by the visulization. Before this PR we would divide the query duration by the number of pixels that can be displayed- which would result in aggregate windows which were not rounded like 0.83s for a query range of 5m. In this PR the aggregate window intervals are rounded to "more reasonable" values.
Along the way, the aggregate window interval input was changed to a duration input, so that users can select any valid duration, and so that the duration is properly labeled and indicated to user.

duration window period change to
5m 0.83s 10s
15m 2.5s 10s
1h 10s 10s
6h 60s 1m
12h 120s 2m
24h 240s 5m
2d 480s 10m
7d ? 30m
30d ? 1h

...

Kapture 2020-01-15 at 18 57 50

Describe your proposed changes here.

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

@ebb-tide ebb-tide changed the title Deniz clean window vars feat(ui) clean window vars Jan 14, 2020
@ebb-tide ebb-tide changed the title feat(ui) clean window vars feat(ui) More reasonable aggregate window intervals for selected query durations Jan 15, 2020
Copy link
Contributor

@hoorayimhelping hoorayimhelping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work, lgtm

ui/src/variables/utils/getWindowVars.ts Outdated Show resolved Hide resolved
@ebb-tide ebb-tide merged commit d753aa4 into master Jan 15, 2020
@ebb-tide ebb-tide deleted the deniz-clean-window-vars branch January 15, 2020 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use clean window period variables
2 participants