We have had a few users asking us in our forums or writing to us at support to know if OpManager widgets can be embedded into their web pages. Yes, OpManager provides the flexibility of embedding widgets or dashboards into a web page, making it easier for a user or a group to access a specific set of information without having to log in and log out every time.
You can embed a widget or a dashboard using an <iframe>. For the benefit of those who have not seen the procedure posted in our forums, here are the steps:
Embedding a Widget
The code snippet to embed a widget is given below:
<iframe src=”http://OpManagerServerName:Port/generateWidget.do?widgetID=194&widgetWidth=520” width=520 height=400 frameborder=”1” scrolling=”no”>
In the above snippet, replace the src name with the actual host name and the port number on which OpManager is hosted and the ID of the widget that you want to embed. Mouse-over the edit icon on the top right corner of the widget to see the ID.
Embedding a Dashboard
You can embed the default dashboards or create a new dashboard and embed.
Here is the snippet to embed a dashboard:
<iframe src=”http://OpManagerServerName:Port/customDashboard.do?methodCall=showCustomDashboard&dashboardID=303” width= height=in_pixelsin_pixels frameborder=”1″>
The snippet to access the dashboard without having to log-in every time is:
<iframe src=”http://OpManagerServerName:Port/customDashboard.do?methodCall=showCustomDashboard&dashboardID=303&reqUserName=guest_user&reqPassword=guest_password” width=in_pixels height=in_pixels frameborder=”1″>
where the user name and password are passed as additional arguments.
Replace the user name, password and the dashboard ID. Access the required dashboard from the WebClient to see the ID passed in the url.
The original query raised in our forums is here:
Embedding OpManager Dashboards in other web pages
So, go on and host the dashboards in your intranet and keep a tab on your network health!
gfdg