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

[Text based] Remove the dataviews dependency #154334

Closed
stratoula opened this issue Apr 4, 2023 · 2 comments · Fixed by #158531
Closed

[Text based] Remove the dataviews dependency #154334

stratoula opened this issue Apr 4, 2023 · 2 comments · Fixed by #158531
Assignees
Labels
enhancement New value added to drive a business result Feature:Unified search Unified search related tasks impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@stratoula
Copy link
Contributor

stratoula commented Apr 4, 2023

Describe the feature:
Right now the text based languages are dependent on dataviews with the following way:

  • If I find a dataview with the index pattern used in the from then I use its time field
  • If not I create an adhoc dataview and use the @timestamp field if exists, otherwise the first date field, otherwise none

We want to change it as:

  • dont try to find a dataview
  • always create adhoc dataviews in the background
  • use always the @timestamp field, if it exists otherwise nothing

This will simplify our code a lot both in Lens and Discover. We would also like to have:

  • A note that the @timestamp is used
  • The timepicker should always be enabled (we need somehow to indicate that the timepicker is not applied even if enabled)
@stratoula stratoula added the Feature:Unified search Unified search related tasks label Apr 4, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 4, 2023
@stratoula stratoula added enhancement New value added to drive a business result impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed needs-team Issues missing a team label labels Apr 4, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 4, 2023
@stratoula stratoula added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed needs-team Issues missing a team label labels Apr 4, 2023
@elasticmachine
Copy link
Contributor

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

@stratoula stratoula self-assigned this Apr 4, 2023
@drewdaemon
Copy link
Contributor

Semi-relatedly, I noticed that none of the data views for our sample data use @timestamp as the default time field, even when @timestamp is available as a field. Flights and logs use timestamp without the @.

stratoula added a commit that referenced this issue May 31, 2023
…mode (#158531)

## Summary

Closes #154334

This PR:
- make the text based languages to work with adhoc dataviews and not
permanent dataviews. The text based languages will not be related with
dataviews
- enables the timepicker always for text based languages
- the timepicker is disabled if the index pattern doesn't have an
@timestamp field
- the timepicker is enabled if the index pattern has an @timestamp field
- the timepicker is enabled if the index pattern doesn't have an
@timestamp field but there is a dirty state (user is writing the query
and hasn't hit the update button. We do that to give the user the
ability to change the timepicker with the query
- An info text has been added to the editor footer to inform the users
about the @timestamp existence

The timepicker in the disabled state needs to have a disabled status
text (All time) but this is not possible atm. I have created an issue to
eui elastic/eui#6814 to add this property.
This is going to be tackled before the 8.9 FF but we don't want to block
this PR

<img width="1839" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/8fc0a492-1f00-41b6-a4a6-b0527725931f">

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Unified search Unified search related tasks impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants