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

Timelion: Move datemath parsing to the client #47813

Merged
merged 5 commits into from
Oct 22, 2019

Conversation

flash1293
Copy link
Contributor

@flash1293 flash1293 commented Oct 10, 2019

Summary

Fixes #12678

This PR moves the parsing of the datemath expression set by the timepicker to the client where it can use the same settings as regular visualizations. The dates sent to the server become ISO-formatted dates that can be used directly.

The original error was caused by the server not taking the client timezone into account when parsing date math, by using the same function as the rest of Kibana this isn't a problem anymore.

It also fixes a CSS issue in the timelion app (not a problem in the Visualize vis) that caused the last query stats to display with 100% of the screen height:
before:
Screenshot 2019-10-11 at 15 56 36

after:
Screenshot 2019-10-11 at 15 56 59

The changed class kuiLocalTitle is not used anywhere else in Kibana.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support

For maintainers

Dev Docs

Timelion server API

The server side api of Timelion /api/timelion/run used to accept datemath strings (like now) for the time.from and time.to properties. This PR removes support for datemath, from now on only ISO8601 encoded strings are supported.

@flash1293 flash1293 added Feature:Timelion Timelion app and visualization release_note:fix release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v8.0.0 v7.5.0 labels Oct 10, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293 flash1293 marked this pull request as ready for review October 10, 2019 15:44
@flash1293 flash1293 added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Oct 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293
Copy link
Contributor Author

flash1293 commented Oct 11, 2019

Just noticed the angular app has it's own request handler, have to fix it there separately.
EDIT: Done

@flash1293 flash1293 requested a review from a team as a code owner October 11, 2019 13:56
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

code LGTM

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

LGTM, removed one CSS line.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293 flash1293 merged commit 6c5c6ef into elastic:master Oct 22, 2019
@flash1293 flash1293 added v7.6.0 and removed v7.5.0 labels Oct 22, 2019
@flash1293 flash1293 deleted the flash1293/timelion-timezone-12678 branch October 22, 2019 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Timelion Timelion app and visualization release_note:fix release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timelion ignores timezone setting
4 participants