1.10 Configuring Homepage

Viewpoint Homepage can be manually configured. The Homepage GUI is generally composed of three columns of gadgets (gadgets are simple HTML and JavaScript applications that can be embedded in Web pages and other applications). Each gadget sizes horizontally according to the width of the browser while the height can be manually configured. There are several configuration options. You can configure the height, position, title, and permission of each gadget. After making the changes in the XML, a refresh of the Homepage displays the new configuration.

1.10.1 Configuring core.xml

The gadget pages are loaded dynamically into Homepage in the order they are configured in the core.xml file. The configuration for Homepage gadgets follows generally, but not perfectly, the Google Gadgets API. Gadgets that are configured for Homepage can be altered to work in any Gadget API-compatible dashboard (such as the WSO2 Gadget Server). A simple module definition in the Google Gadgets API has this format:

<Module>
  <ModulePrefs title="Resource Utilization" height="400"/> 
  <Content type="url" href="../charts/resource_utilization_chart.jsp" /> 
  <UserPref name="loc" display_name="Location" required="true" /> 
</Module>

The gadget syntax for Homepage has been changed to adhere to the current syntax of the Viewpoint core.xml file (<Module> has changed to <module>, and <ModulePrefs> has changed to <module-prefs>). Additionally, information is added to the module for static configuration in the GUI (in Google Gadgets API compatible gadgets, the configuration is done through the GUI). A sample Viewpoint Homepage configuration looks like this:

<config>
  ...
  <home-page>
    <module>
      <module-prefs title="Resource Utilization" height="350"/>
      <content type="url" href="../charts/resource_utilization_chart.jsp"/>
      <positioning column="1" priority="3"/>
      <user-pref name="refresh" default_value="30" datatype="hidden" required="true"/>
      <permission>root</permission>
    </module>
    <module>
      <module-prefs title="Troubled Resources" height="400"/>
      <content type="url" href="../tables/troubled_resources_table.jsp"/>
      <positioning column="2" priority="1"/>
      <permission>root</permission>
    </module>
    <module>
      <module-prefs title="My Workload" height="350" />
      <content type="url" href="jsp/dashboard/tables/workload_table.jsp" />
      <positioning column="1" priority="4" />
      <user-pref name="myWorkload" default_value="false" datatype="hidden" required="true" />
      <permission name="nav.homepage" />
    </module>
    <module>
      <module-prefs title="Jobs Needing Attention" height="350" />
      <content type="url" href="jsp/dashboard/tables/jobs_needing_attention.jsp" />
      <positioning column="2" priority="4" />
      <user-pref name="needingAttention" default_value="true" datatype="hidden" required="true" />
      <permission name="nav.homepage" />
    </module>
  </home-page>
  ...
</config>

The following is an explanation of the elements and their attributes: