-
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
[dashboard][ES|QL] Update no data views ES|QL action to open new dashboard with new inline lens panel #176159
Comments
Pinging @elastic/kibana-presentation (Team:Presentation) |
Assigning this to the @elastic/appex-sharedux team as well. Interest was expressed in this comment. Leaving our assignment in case any Dashboard APIs need to be extended to make this possible. |
Pinging @elastic/kibana-esql (Team:ESQL) |
@tsullivan - how much of a scope addition would this be to the other work you're doing to make ESQL present as a first class citizen? Can we squeeze this in before 8.16, or is this big enough to make it a piece of planned work for Q3? |
@petrklapka the only scope change seems to be in the action triggered by clicking the button to try ES|QL. I will try to squeeze this in, as that could be on the small side. A few questions:
|
No Discover works as expected atm Tim and we don't want to change the behavior. We want different action for the dashboard though. Ideally I would like to open an empty dashboard with the new ES|QL panel open like that: Not sure if this is possible though, the presentation team will know |
This could be accomplished with embeddable state transfer service. In Discover, you could do something like this in an onClick handler
|
@stratoula @nreese I'm working on the request to open a new dashboard with a new inline lens panel, but currently I'm getting stuck on how to define the object that is passed for the |
@tsullivan I think the best thing you can do is to use the Lens suggestions api to take the state. I am doing something similar here https://github.com/elastic/kibana/blob/main/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts#L106 So here you will need:
The getESQLQueryColumns can be imported from '@kbn/esql-utils'. When you pass this to the suggestions api it will most posibly suggest a table. Get the attributes for the embeddable input like this:
Ping me if you have any questions. I hope it helps! |
@petrklapka @nreese @stratoula I received a lot of help on this effort (thank you very much, Nathan and Stratoula) I think this task is better left to the subject experts with knowledge about the Embeddable API and Lens API. I'm going to work on a PR to deliver a new look and feel for the "No Data" prompt, which will add an extension point that will allow consumers to customize the action triggered when the user clicks the "Try ES|QL" button. After that, I will post a Draft PR that has the beginnings of a feature that customizes the action for Dashboard and will include some of the info I got from researching this task with Nathan and Stratoula. I won't plan to complete the draft PR, instead I will hand off ownership to a volunteer who can finalize the work to open a new dashboard with an inline Lens panel. |
Here is the Draft PR: #196449 |
…hen there are no dataviews (#196658) ## Summary Closes #176159 Try ES|QL button now navigates to dashboard with an ES|QL chart embedded. ![meow](https://github.com/user-attachments/assets/47ae19f5-1ed2-49f1-aceb-1f7287f58251) ### Checklist - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…hen there are no dataviews (elastic#196658) ## Summary Closes elastic#176159 Try ES|QL button now navigates to dashboard with an ES|QL chart embedded. ![meow](https://github.com/user-attachments/assets/47ae19f5-1ed2-49f1-aceb-1f7287f58251) ### Checklist - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit af139b4)
Spin off of #174316 (comment)
On the current "no data views" page, clicking the
Try ES|QL
action takes the user to Discover. Instead, the action should take the user to a new dashboard with a new lens ES|QL panel.The text was updated successfully, but these errors were encountered: