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

[Logs UI] Preserve relative dates selected in the Logs Analysis page datepicker #44706

Merged

Conversation

weltenwort
Copy link
Member

Summary

This PR changes the type of the state used to store the dates selected via the datepicker in the URL to string. That means it preserves the occurrences of now, now-2w and similar date math expressions without eagerly converting them to a specific timestamp. In combination with the fact that the analysis results page now keeps the selected date range as strings and the query date range as separate numeric timestamps, this fixes the usage of the relative time ranges in the datepicker in combination with the auto-reload functionality of the datepicker.

grafik

grafik

Additionally this PR makes use of the fixed auto-reloading by enabling it by default with a 30 second interval to make the onboarding smoother. The "no data" message on the results page will now be replaced by the chart as soon as the log rate analysis job has started producing results.

It further fixes the rounding of the end date to round up. That means that the quick select intervals like "This year" or "This week" actually work and result in a non-empty interval.

fixes #44670

Checklist

@weltenwort weltenwort added bug Fixes for quality problems that affect the customer experience Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.4.0 v8.0.0 labels Sep 3, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-logs-ui

@weltenwort weltenwort self-assigned this Sep 3, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@weltenwort weltenwort added the release_note:skip Skip the PR/issue when compiling release notes label Sep 3, 2019
@weltenwort weltenwort marked this pull request as ready for review September 3, 2019 21:33
@weltenwort weltenwort requested a review from a team as a code owner September 3, 2019 21:33
@Kerry350 Kerry350 self-requested a review September 5, 2019 07:43
@weltenwort
Copy link
Member Author

@Kerry350 FYI, I just merged master to resolve the conflict - no functional changes intendend

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

All looks good to me 👍 The addition of the default auto reload does make the onboarding feel nicer. My bad for the original bug on the time front 😬

@weltenwort
Copy link
Member Author

My bad for the original bug on the time front

My bad for creating a bad example on the logs stream page... it's still happening there 🙈

@weltenwort weltenwort merged commit 135a8f5 into elastic:master Sep 5, 2019
@weltenwort weltenwort deleted the logs-ui-analysis-tab-relative-time branch September 5, 2019 15:02
weltenwort added a commit to weltenwort/kibana that referenced this pull request Sep 5, 2019
…c#44706)

This changes the type of the state used to store the dates selected via the datepicker in the URL to string. That means it preserves the occurrences of now, now-2w and similar date math expressions without eagerly converting them to a specific timestamp. In combination with the fact that the analysis results page now keeps the selected date range as strings and the query date range as separate numeric timestamps, this fixes the usage of the relative time ranges in the datepicker in combination with the auto-reload functionality of the datepicker.

Additionally the page now makes use of the fixed auto-reloading by enabling it by default with a 30 second interval to make the onboarding smoother. The "no data" message on the results page will now be replaced by the chart as soon as the log rate analysis job has started producing results.

It further fixes the rounding of the end date to round up. That means that the quick select intervals like "This year" or "This week" actually work and result in a non-empty interval.
weltenwort added a commit to weltenwort/kibana that referenced this pull request Sep 5, 2019
…c#44706)

This changes the type of the state used to store the dates selected via the datepicker in the URL to string. That means it preserves the occurrences of now, now-2w and similar date math expressions without eagerly converting them to a specific timestamp. In combination with the fact that the analysis results page now keeps the selected date range as strings and the query date range as separate numeric timestamps, this fixes the usage of the relative time ranges in the datepicker in combination with the auto-reload functionality of the datepicker.

Additionally the page now makes use of the fixed auto-reloading by enabling it by default with a 30 second interval to make the onboarding smoother. The "no data" message on the results page will now be replaced by the chart as soon as the log rate analysis job has started producing results.

It further fixes the rounding of the end date to round up. That means that the quick select intervals like "This year" or "This week" actually work and result in a non-empty interval.
weltenwort added a commit that referenced this pull request Sep 5, 2019
#44892)

Backports the following commits to 7.x:
 - [Logs UI] Preserve relative dates of Logs Analysis datepicker (#44706)
weltenwort added a commit that referenced this pull request Sep 5, 2019
#44914)

Backports the following commits to 7.4:
 - [Logs UI] Preserve relative dates of Logs Analysis datepicker (#44706)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Logs UI Logs UI feature release_note:skip Skip the PR/issue when compiling release notes review Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs UI] Log Analysis screen turns "now" date into fixed timestamp
3 participants