Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Add Custom Common Time Ranges #239

Conversation

davidcui1225
Copy link
Contributor

@davidcui1225 davidcui1225 commented Dec 3, 2020

Issue #, if available:
N/A
Description of changes:
The default custom time ranges in the date picker end up with invalid time ranges. Replacing them with custom time ranges that don't violate our time range:

  • Today so far
  • Week to date
  • Month to date
  • Year to date

Screen Shot 2020-12-03 at 9 50 33 AM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

Why do we limit time range to be <= now? And what happens if users manually select a future date?

@davidcui1225
Copy link
Contributor Author

Why do we limit time range to be <= now? And what happens if users manually select a future date?

There is no data to be displayed if the time range ends in the future, so we do not support it. If a future date is selected, the Time Range error toast will display, as well as the client-side input validation not allowing the definition to be created.

@davidcui1225 davidcui1225 merged commit d793b98 into opendistro-for-elasticsearch:dev Dec 3, 2020
@davidcui1225 davidcui1225 deleted the time-range-common-ranges branch December 3, 2020 19:57
zhongnansu pushed a commit to zhongnansu/kibana-reports that referenced this pull request Dec 4, 2020
zhongnansu pushed a commit to zhongnansu/kibana-reports that referenced this pull request Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants