-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Timelion: Move datemath parsing to the client #47813
Conversation
💔 Build Failed |
💚 Build Succeeded |
Pinging @elastic/kibana-app (Team:KibanaApp) |
Just noticed the angular app has it's own request handler, have to fix it there separately. |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM
There was a problem hiding this 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.
💚 Build Succeeded |
@elasticmachine merge upstream |
💚 Build Succeeded |
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:
after:
The changed class
kuiLocalTitle
is not used anywhere else in Kibana.Checklist
Use
strikethroughsto 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- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriatelyDev Docs
Timelion server API
The server side api of Timelion
/api/timelion/run
used to accept datemath strings (likenow
) for thetime.from
andtime.to
properties. This PR removes support for datemath, from now on only ISO8601 encoded strings are supported.