In addition to the provided Viewpoint Gadgets, you can create gadgets of your own and place them in Homepage.
To create and place a new gadget in Homepage,
- Acquire data from Moab:
- Developers can create Groovy scripts (Groovlets) to supply server-side data. Examples can be found in the $CATALINA_HOME/moab/groovy directory. Data can, however, be served to custom gadgets from Moab using any language.
- Any servlet data now available can be used or combined with other information in the creation of new gadget UIs.
- Design the UI portion of the gadget:
- Examples of JSP UI gadgets can be found in the Viewpoint deployment in moab/jsp/dashboard/.
- Examples of FusionCharts are in moab/jsp/dashboard/charts. The Resource Utilization Gadget uses resource_utilization_chart.jsp, which uses FusionChartsHTMLRenderer.jsp as a FusionCharts helper, and loads its data from the REST Servlet. The path to the FusionCharts SWFs, as well as configuration, can be found in the resource_utilization_chart.jsp file. There are additional UI configurations passed to the UI portion in the XML from the REST Servet and contained in the file ResourceUtilizationRequestHandler.java. FusionCharts mixes UI configuration with data. For more information on the FusionCharts bar chart configuration, see the Column 3D Chart Specification Sheet. For more information on FusionCharts, see the FusionCharts Documentation.
- Examples of the JavaScript widget library SmartClient tables are found in moab/jsp/dashboard/tables. The System Events Gadget, loaded from system_events_table.jsp, is a good example. Data is loaded in JSON from the REST Servlet as explained above. Data is loaded using the SmartClientRestDataSource and displayed in the SmartClient ListGrid. User preferences are used to determine the refresh rate as described in Configuring Homepage.
- Any UI technology can be used for creating gadgets. Homepage requires merely a URL and loads the URL into an iframe. As the provided Viewpoint Gadgets are nearly compatible with the Google Gadgets API, they can be ported to a compatible dashboard.
- Configure Homepage to include the provided gadget:
- For more information on how to configure your gadget in Homepage, see Configuring Homepage.
- Set the
href
attribute to point to the URL of the UI portion of your gadget.