Embed Data Table ignoring app state in >6.2

Hi,

I'm using Kibana in a little twisted way, but long story short, I run a script that allows expanding Data Tables by adding an iframe in the DOM that contains an embeded Data Table visualization to wich I pass a filter based on the selected value.

e.g. :
var filter = "&_a=(query:(match:(myField.keyword:(query:" + myValue+ "))))";

Since I updated to Kibana 6.2 (from 6.1), it stopped working. The visualization is generated without that filter.
Actually, I also tried modifying filters that were saved in the visualization, and those changes are also ignored.

I checked the generated URL, and if i remove the "embed=true" parameter, it works fine, the filter is there, and the documents are filtered according to it.

I came to the conclusion that embeded visualizations (at least Data Tables) "discard" the app state provided in the URL. I've been searching the patch note but couldn't find related updates.

Does anyone know if this behaviour is intended and/or how I can avoid it ?

Regards,

Adrien

Hey @admgs are you embedding Visualize or a Dashboard? If you're embedding an iframe, https://github.com/elastic/kibana/issues/15740 is likely the culprit.

Hi @Brandon_Kobel,
I'm embedding a visualization (data table) in an iframe without using a dashboard.

https://github.com/elastic/kibana/issues/15740 sounds very similar to my issue! I see there was a merged pull request, I'll build from the master to check if it solves things.

Thank you!

Quick update : the https://github.com/elastic/kibana/pull/15728 PR doesn't fix my issue although it seems very closely related.

@Stacey_Gammon could you confirm if it's related?

Nah, unfortunately they are two different things. Filters are stored slightly differently then the state discussed in issue #15740 which isn't actually fixed (it's been broken for a long time). The PR you linked to fixed a similar problem with visualizations that was broken recently.

You are actually running into this bug: https://github.com/elastic/kibana/issues/16595

The visualization team is working on a fix for 6.3, the PR is here: https://github.com/elastic/kibana/pull/16642, though there is some discussion and the fix is not the most straightforward, so hopefully it will get in!

Thank you very much for your answer!

I grabbed the change from https://github.com/elastic/kibana/pull/166421 and it fixed my issue!
Having duplicate filters sent to ES doesn't seem to affect my results.

Good to know it's a knonw issue tho.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.