elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.68k stars 8.23k forks source link

[ES|QL] Lens inline editing doesnt render the results of the rest source commands (except from the from command) #186352

Open dej611 opened 5 months ago

dej611 commented 5 months ago

Describe the bug:

Open a ES|QL panel in dashboard and try any of the following queries:

show info
meta functions
row a = abs(1.5)

Then press play to submit the query and check if the chart configuration changes. Click Apply and save and then reopen the inline editor: the previous query is still there.

eslql_inline_bug

Expected behavior:

The fields in the configuration should automatically update.

elasticmachine commented 5 months ago

Pinging @elastic/kibana-esql (Team:ESQL)

stratoula commented 5 months ago

Hey @dej611 this is not an editor bug, there is a check in the flyout that is not allowing that (or something like that, I have to check the code). The editor allows everything, also is just a UI component. The data fetching is done in the consumers.

elasticmachine commented 5 months ago

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

stratoula commented 5 months ago

I remembered! So here https://github.com/elastic/kibana/blob/main/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx#L302 we are not allowing a change when Lens suggestions api doesnt return a valid chart.

Not sure which is the best thing to do here, we could possibly return the results in a table.

But anyway I think is kind of expected and def low impact. I personally think is mostly an enhancement.

dej611 commented 5 months ago

Interestingly, that line of code prevents a valid query with no result to be "saved". I think that relying only on the Lens suggestions system to decide whether to save or not the ES|QL query should be re-evaluated. I see the two things unrelated.