My html file for the web portal consists of nothing but the iframe link for the panel. I was just testing out whether the images are being sent to a portal( here, my localhost ) or not. While it does work, it just sends the panel screen portion AS IS. In an editable form. I used the Grafana panel’s embedded link for sharing the iframe src link in my Html code. What do I do to get just the jpeg of the panel?
(I’ve tried both viewer/editors setting on grafana.ini file, neither shows any change to my requirement)
Can you show the html snippet you are using?
It should look like this example in the docs: https://grafana.com/docs/grafana/latest/reference/share_panel/#embed-panel
Here’s my HTML code pretty much. (Ignore the line break, I put it to wrap up the long URL link )
I even did the said changes in my ini. file
No luck, though. It still appears in an editable form.
Can you test navigating to the http://grafana.staged-by-discourse.com/d-solo/… that you have in your screenshot. It should only show the panel without the menu.
So just did a test with the following html:
<html>
<head> </head>
<body>
<iframe src="http://grafana.staged-by-discourse.com/d-solo/YFlVmSTmk/stackdrivercore?orgId=1&from=1585822429489&to=1585823329490&panelId=18" width="450" height="200" frameborder="0"></iframe>
</body>
</html>
With the following settings in my ini file, allow_embedding = true
and
[auth.anonymous]
enabled = true
And got:
Yep I did that. Sadly, it still redirects me to an editable link of the dashboard panel.
Does this go to a panel that is not editable? (This is the embed url for the start page on the play site)
https://play.grafana.org/d-solo/000000012/grafana-play-home?orgId=1&from=1586107444589&to=1586114644590&panelId=2
Also, what version of Grafana are you using?
If I click on the link, it is coming up fine. But if I place this as part of iframe_src in my html file, I am not able to see anything.
Version 6.6.0 is what I’m currently using
You won’t be able to embed it as that is not turned on for play.grafana.org - just wanted to check that it worked on your OS and browser.
The only way I can recreate this is by linking to the home dashboard with this embed snippet:
<iframe src="http://grafana.staged-by-discourse.com/?orgId=1&from=1586179736081&to=1586201336081&panelId=1" width="450" height="200" frameborder="0"></iframe>
Can you try the embed link for a different panel - or are you linking to the home dashboard?