About kibana exporting as an iframe

After exporting kibana's dashboard as an iframe,how to disable click events related to charts? To prevent the relevant date interval from being arbitrarily changed.

@111178 is your dashboard iframe being loaded with the url param ?embed=true ? It disable some controls for when we are in the embed mode.

However if that didn't solved your problem, one thing that also occur to me is that you can achieve it through the css maybe:

Applying pointer-events: none to the iframe element and also width and height property to draw the iframe completely and then an overflow: scroll your desired width and height in the parent element containing the iframe .

Thank you very much . The url already contains "?Embed = true",I'm going to try to do that by controlling CSS.However,since I have nested the iframe into the vue, I am not yet able to retrieve the elements in the iframe.Next I will try to solve this problem, and I would be grateful if you could give me some advice

@111178 I'm not sure if I followed your last question. You just need to apply css in the vue iframe element and to the vue element which is parent of the vue iframe, so both would be "visible". Am I missing something here?

Maybe there is something wrong with my method. I failed in vue's mounted lifecycle function to get the elements in the iframe.I'll try your way. Thank you.

Now,I succeeded in disabling all the functions, but I only wanted to disable the click events on the chart, not all the events.I disable all the methods first and try to restore the hover event.

@111178 I see

Maybe you can try to use the contents from jQuery https://api.jquery.com/contents/

something close to:

const iframeContents = $(...).contents().click((event) => {
  event.preventDefault();
  return false;
});

Thankyou very much. I'll try it. I think my problem will be solved

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