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

Allow pasting timestamps into Start Date and End Date on discover page #159098

Closed
Tracked by #7112
mjaggard opened this issue Jun 6, 2023 · 14 comments · Fixed by elastic/eui#7331
Closed
Tracked by #7112

Allow pasting timestamps into Start Date and End Date on discover page #159098

mjaggard opened this issue Jun 6, 2023 · 14 comments · Fixed by elastic/eui#7331
Assignees
Labels
blocked Feature:Timepicker Timepicker Feature:Unified search Unified search related tasks impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Visualizations Visualization editors, elastic-charts and infrastructure usability

Comments

@mjaggard
Copy link

mjaggard commented Jun 6, 2023

Describe the feature:
When I go to the discover page at /app/discover I can enter date times for the start and end dates if I make them absolute but they must be in a specific format MMM D, YYYY @ HH:mm:ss.SSS which is not how timestamps exist in our log files - we use ISO 8601. It would be great if pasting a timestamp in various formats such as ISO 8601 (as long as they're unambiguous) would reformat automatically into the current format.

Describe a specific use case for the feature:
I frequently start from a timestamp in a single log file or in our audit when looking to understand an issue. I then need to search for related logs or other data using Kibana but first I have to take the time to reformat my date time or to select the time using the widget.

Possible issues
Timestamps in Logstash and timestamps pasted may each have a timezone which requires some reconciliation which may not be trivial. My guess is that a missing timezone in ISO 8601 would be best interpreted as UTC rather than "Local time" for example.

@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 6, 2023
@jughosta jughosta added Feature:Unified search Unified search related tasks Team:Visualizations Visualization editors, elastic-charts and infrastructure Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Jun 13, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jun 13, 2023
@mjaggard
Copy link
Author

Nice to have: Also allow pasting a Unix timestamp in seconds or milliseconds past midnight 1st Jan 1970 UTC excluding leap seconds.

@jughosta jughosta added the Feature:Timepicker Timepicker label Jun 13, 2023
@stratoula
Copy link
Contributor

stratoula commented Jun 13, 2023

This will need work from EUI too as this is not supported in EUISuperDatePicker. Right now it supports only one format that can change from advanced settings but doesn't support pasting valid dates (regardless the format and convert to the selected)
image

@stratoula stratoula added blocked impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Jun 13, 2023
@davismcphee davismcphee added loe:needs-research This issue requires some research before it can be worked on or estimated impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Jun 22, 2023
@timductive timductive removed the impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. label Jun 28, 2023
@timductive
Copy link
Member

@elastic/eui-team

@cee-chen
Copy link
Contributor

cee-chen commented Jul 3, 2023

@timductive and @stratoula - thanks for pinging us, and apologies for the slower response! You're right that this is something EuiSuperDatePicker doesn't currently support. We'd probably set this at a medium LOE in terms of implementation.

What priority would your team set on this? That will help inform how EUI triages this issue and when we set aside time to take a look at it.

@stratoula
Copy link
Contributor

@cee-chen thanx a ton! I will sync with Tim about the prioritization and let you know!

@mjaggard
Copy link
Author

mjaggard commented Jul 4, 2023

Just to chip in on the prioritisation as the OP, this is something that adds quite a few crucial seconds when I'm urgently attempting to resolve an issue but I'm never completely blocked by this.

I currently work for a small paying hosted-service customer and I would have also used this at my previous place of work who are a bank who pay for on-site licenses. I would also say that the usefulness of this depends on end-users knowing its an option.

@timductive
Copy link
Member

@cee-chen give us a few weeks to prioritize within the context of a larger initiative around usability between kibana and EUI. I'd like to get a list of all the improvements we want to collaborate on and then rank this there.

@JasonStoltz
Copy link
Member

@cee-chen In EUISuperDatePicker, it looks like we use kbn-datemath/moment under the hood. Do you think it's possible to attempt to parse whatever date string a user provides, rather than expecting a particular format?

@cee-chen
Copy link
Contributor

cee-chen commented Nov 1, 2023

@mjaggard We have a PR coming that should allow ISO 8601, RFC 2822, and Unix (seconds only, not milliseconds) timestamps to the datepicker absolute tab. We'd love it if you could quickly test it out and let us know if it works for your use case: https://eui.elastic.co/pr_7331/#/templates/super-date-picker

Regarding the timezone reconciliation mentioned in your issue description, I'm leaving it up to the Moment library to interpret the missing timezone currently - let us know if that works for you.

@mjaggard
Copy link
Author

mjaggard commented Nov 1, 2023

Perfect, thank you.

@cee-chen
Copy link
Contributor

cee-chen commented Nov 2, 2023

FYI - we added a 1 second debounce to the date input to allow users who are manually entering timestamps to finish typing (otherwise Moment thinks you've entered a Unix timestamp the second you type in a single digit 😅). Please feel free to leave feedback if that extra time delay significantly impacts the user flow you were looking for. More rationale and discussion for that change can be found here: elastic/eui#7331 (review)

Also, as a heads up, this will take another ~2 weeks or so to reach Kibana main but should be in by 8.12 release.

@stratoula
Copy link
Contributor

@cee-chen this is fantastic! Thanx a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Feature:Timepicker Timepicker Feature:Unified search Unified search related tasks impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Visualizations Visualization editors, elastic-charts and infrastructure usability
Projects
None yet
8 participants