-
Notifications
You must be signed in to change notification settings - Fork 154
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
Iframe height #41
Comments
what parameters are you sending? and then seeing? As an aside, can I ask you how you are using this? to explore digital library content? |
I am running a nodejs app locally on the same machine. It produced 2 web pages. It randomly loads a video from a list of all of our video streams and other page does the same from a list of images. Both randomly selects a string from within an array and dynamically sets the url of the media upon request. This isn't requiring a page refresh or anything. I also set a div height so that it shouldn't cut off the page. Here is a gist of what the browser sees for either one of them. https://gist.github.com/DonRichards/ee2384f31a7d21822dc00affc313212c |
We've seeing this as well. We have a weather widget running in a dasboard in the public area and the initial frame height is just 150px. The surrounding panel ( The devtools show an <div class="ngtemplate">
<!---->
<iframe frameborder="0" width="100%" height="" ng-src="https://internal.lan/weather/" ng-if="ctrl.panel.method === 'iframe'" src="https://internal.lan/weather/"></iframe>
<!---->
</div> The panel JSON looks like this: {
"datasource": "-- Grafana --",
"gridPos": {
"h": 18,
"w": 13,
"x": 10,
"y": 14
},
"header_js": "{\n Accept: 'image/jpeg'\n}",
"id": 14,
"links": [],
"method": "iframe",
"mode": "html",
"options": {},
"params_js": "{ }",
"request": "http",
"responseType": "blob",
"showTime": false,
"showTimeFormat": "LTS",
"showTimePrefix": null,
"showTimeValue": "recieve",
"skipSameURL": true,
"templateResponse": true,
"title": "Weather forecast",
"transparent": true,
"type": "ryantxu-ajax-panel",
"url": "https://internal.lan/weather/",
"useDatasource": false,
"withCredentials": false
} If I resize the window (i.e. grabbing a window border and move is just 1px), the iframe snaps into place and is correctly displayed. I assume a resize event handler corrects the height, but is not invoked on load (anymore). This happens independent of the view mode (kiosk mode or not), on the latest Grafana version (6.3.3). I believe, we're observing the current behaviour for the last 2-3 weeks, so this might coincide with the 6.3.0 release. |
I forgot to add: This is with version 0.0.6. Looking at https://github.com/ryantxu/ajax-panel#changelog, 0.0.7 should be available, however https://grafana.com/grafana/plugins/ryantxu-ajax-panel only lists 0.0.6. Could you cut a proper release, so we can test whether that fixes the bug? |
Not sure if the will fix the issue or not but it does look related. #42 |
Nevermind, doesn't seem to fix this. |
Located where I think the error is happening. Found in src/module.ts Line 419. Setting the height to 510px in the DOM made the UI look correct. I'm not familiar with Grafana plugin debugging enough to help any further but I'm really hoping this can be corrected quickly. This page is kind of an eye sore right now. |
Sorry, my post is mostly saying what @dmke already said. |
I'll take a look at this today -- and hopefully post an fix |
Thank you very much for your time. I really apreciate. |
@DonRichards @tinotuno -- can you guys test with: You can get a zip from: If that fixes your issue -- I will get this published ASAP |
Wow...! In my case, with external html pages in the iframe works perfectly! |
@ryantxu Just a heads up. Grafana doesn't see the update. |
Can confirm, the 0.0.7 build works flawlessly. Until that version is published on grafana.com, here's what I did on my Grafana server: $ # backup, optional
$ rsync -av [email protected]:/var/lib/grafana/plugins/ryantxu-ajax-panel/ ./ajax-panel-0.0.6/
$ # download, unzip
$ wget https://github.com/ryantxu/ajax-panel/archive/v0.0.7.zip
$ unzip v0.0.7.zip
$ # update files on server
$ rsync -av ./ajax-panel-0.0.7/ [email protected]:/var/lib/grafana/plugins/ryantxu-ajax-panel/ --delete |
Iframe to load video, looks correct at first.
But then after saving and coming back it cuts off the bottom of the frame.
How do I correct this?
The text was updated successfully, but these errors were encountered: