kibana/packages/kbn-es-query
Clint Andrew Hall 450f9f62e2
[ES|QL] Bypass no data views screen (#174316)
> Derived from https://github.com/elastic/kibana/pull/173068
> Further addresses https://github.com/elastic/kibana/issues/169873

## Summary

- We're adding a link to the No Data Prompt to send a person to explore
their data using ES|QL if there exists any ingested data but no data
view.
- This PR populates the query bar with the first available index (some
special handling for logs index.
2a9edec678)
- All consumers of the prompt/no data view are updated in this PR.
- [x] ~There's an issue where, if you're in Discover, clicking the link
won't refresh the page. .~ This is fixed on Discover side by
reinitializing the state container when user clicks the "try es|ql" link
and URL state updates.
- [x] ~There is an issue that you can save the es|ql chart from
Discover, but Dashboard's empty screen blocks the navigation because
data views don't exist
https://github.com/elastic/kibana/pull/174316#issuecomment-1914722657~.
This is fixed by allowing the dashboard to work without the default data
view. Hopefully, this won't lead to major issues
- [x] ~ES|QL panels can't be created without the default data views~
this is fixed by trying to fallback to an ad-hoc dataview, plan to move
that code to the utils introduced here
https://github.com/elastic/kibana/pull/174736/
- [x] fix circular deps
- [x] Add functional tests


## Visuals



af3592c1-f4c8-43bb-a128-3268b7761367




### Storybook Stories

#### Can access ES|QL

![Screenshot 2024-01-31 at 17 05
47](370d0351-198e-4dc3-b22e-86f497ad4df5)


#### Cannot access (e.g. preview is unavailable - _not implemented_)

![Screenshot 2024-01-31 at 17 05
59](c2bf52ab-9fa8-4f25-9e5d-512d4f4342fa)


---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Rachel Shen <rshen@elastic.co>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2024-02-05 15:09:27 +01:00
..
src [ES|QL] Bypass no data views screen (#174316) 2024-02-05 15:09:27 +01:00
BUILD.bazel Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
index.ts [ES|QL] Bypass no data views screen (#174316) 2024-02-05 15:09:27 +01:00
jest.config.js [Es query] Move to package (#103530) 2021-07-21 17:10:55 +02:00
kibana.jsonc Update codeowners to move AppServices packages to DataDiscovery (#149065) 2023-01-18 13:34:28 -07:00
package.json flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
README.md [Es query] Move to package (#103530) 2021-07-21 17:10:55 +02:00
tsconfig.json [ES|QL] Use same adhoc dataviews for queries with the same index pattern (#174736) 2024-01-31 19:56:24 +02:00

@kbn/es-query

Shared common (client and server sie) utilities shared across packages and plugins.