Page 1 of 1
HTML Dashlet Problem
Posted: Fri Apr 09, 2010 3:42 pm
by promote
I'm playing around with html dashlets and created an html dashlet from the example that calls a URL in an iframe to display a flash map from Scrutinizer. It works great in the dashboard, but there a bug when using the Dashlet Manager. It tried to load the iframe instead of an image preview that I've selected.
manage_dashlet_iframe_fail.JPG
Re: HTML Dashlet Problem
Posted: Fri Apr 09, 2010 3:44 pm
by promote
I'd like to note that when I tried to use the straight up URL example, the flash did not load in the dashlet.
Re: HTML Dashlet Problem
Posted: Mon Apr 12, 2010 10:23 am
by mmestnik
What browser are you using? Try with FireFox. I'd personally like to hear the experience ppl have with Google Chrome, even though we don't think we expect that to work.
Re: HTML Dashlet Problem
Posted: Mon Apr 12, 2010 10:51 am
by promote
I'm using FireFox 3.6
Re: HTML Dashlet Problem
Posted: Mon Apr 12, 2010 11:20 am
by mmestnik
Ohh, I see what the problem is now. I though it was just a size/spacing issue, but you are trying to point out a total replacement of content. I though I've seen this reported b4.
What version of XI? Are you using 1.1.H?
http://tracker.nagios.com/view.php?id=31
Re: HTML Dashlet Problem
Posted: Tue Apr 13, 2010 2:51 pm
by admin
You can modify the type of output from the dashlet based on its current "location". There are three different types of "locations" or "modes":
1. DASHLET_MODE_PREVIEW - This is the mode the dashlet is in when its shown in the preview page / administrator view
2. DASHLET_MODE_OUTBOARD - The mode the dashlet is in when its embedded in a "normal" (non-dashboard) page.
3. DASHLET_MODE_INBOARD - The mode the dashlet is in when its placed on / displayed in a dashboard.
I would suggest looking at the code for the worldtimesaver dashlet that ships with Nagios XI. You can download the code to see how it displays different output from IN/OUTBOARD and PREVIEW modes. Look around lines 95 and 129 of worldtimeserver.inc.php for the code I'm referring to.