1 – Setup and customization > 1.3 Viewpoint customization > Configuring Homepage gadgets > Customizing Homepage gadget layout

Customizing Homepage gadgets

You can set the height and width for each Homepage gadget. Additionally, you can manually configure the placement and order of the gadgets on the Homepage. If you want, you can even configure how often a gadget automatically refreshes.

Scrolling is disabled in gadget iframes. If you add a custom gadget, make sure it will fit within the size specifications you set.

Gadget settings are controlled in the gadgets.xml file.

This topic contains these sections:

Gadget size

Gadget size is configured in the gadgets.xml file, located in the $VIEWPOINT_HOME/hpc directory. To preserve balance and uniformity on the Homepage, gadget sizes are based off of a multiplier, or a unit of measurement in pixels, that us used in intervals of 1, 2, 3, etc. For example, let's say you wanted to size a gadget so that it was tall, but not very wide. You could specify your multiplier amount (by default, it is 290 pixels), and then give the gadget an interval height of "2" and a width of "1." This would cause your gadget to be 290 pixels wide and 580 pixels tall.

Additionally, you can change the amount of space between gadgets by changing the <spacing> value in the gadgets.xml file. The default setting is 12 px.

To resize a gadget

  1. Open the gadgets.xml file in the $VIEWPOINT_HOME/hpc directory.
  2. (Optional) If you want to change the multiplier size, locate the <layout> element, nested in the <gadgets> element, and change the <multiplier> value.
  3. For example, if you want to change the multiplier size to 250 pixels, do the following:

    ...
       <layout>
          <multiplier>250</multiplier>
          <spacing>12</spacing>
       </layout>
    ...
  4. All gadgets appear under the <gadget-list> element. For the gadget you want to resize (for example, the Virtual Machine Utilization gadget), find the <positioning> element and do the following:
    1. Set the height attribute to an interval number (for example, "1" or "2"). This value indicates the number by which you want to multiply the multiplier amount (in this example, 250 pixels). So if you specify "1," the gadget height will be 250 pixels; if you specify "2," the gadget height will be 500 pixels.
    2. Set the width property attribute to an interval number (for example, "1" or "2"). This value also indicates the number by which you want to multiply the multiplier amount (in this example, 250 pixels). So if you specify "1," the gadget width will be 250 pixels; if you specify "2," the gadget width will be 500 pixels.
  5. For example:

    ...
       <gadget title="Virtual Machine Utilization" id="vmUtilization">
          <content type="url" href="gadgets/vmUtilization"/>
          <positioning priority="10" height="1" width="2"/>
          ...
  6. Save the gadgets.xml file.

Your changes will take immediate effect once you refresh the Viewpoint Homepage.

Gadget order

Gadgets are ordered in a left-to-right fashion determined by the priority value they are assigned in the gadgets.xml file. The lower the value, the higher the priority. For example, a gadget with a priority of 10 will display before a gadget with a priority of 20. By default, the gadgets are assigned priority values in units of 10 (10, 20, 30, etc.).

When gadgets will not fit side-by-side because of a smaller browser window size, Viewpoint may automatically re-order the gadgets to use up the window real estate.

For example, say that gadgets are prioritized to display gadget A first, then gadget B, gadget C, and so on. Gadget A and gadget B are wide gadgets and may not fit side-by-side on a small window. In this case, Viewpoint automatically re-orders the gadgets so that the next possible gadget that can fit next to gadget A (gadget C, maybe) will move up to take the slot. Once the window is again resized to be large enough, the gadget B will move back into its place next to gadget A.

To arrange gadget order on the Homepage

For this task, we will use an example. By default, the first three gadgets are prioritized in this order: Virtual Machine Utilization (first), Urgent Events Log (second), and Node Utilization (third). Let's say that you want to reorder these gadgets so that Node Utilization comes second, and Urgent Events Log comes third. Here is what you would do:

  1. Open the gadgets.xml file in the $VIEWPOINT_HOME/hpc directory.
  2. The gadgets all appear under the <gadget-list> element.

  3. Locate the Node Utilization gadget. Notice that its <positioning> priority value is set to "30". Change it to "20".
  4. <gadget title="Node Utilization" id="nodeUtilization">
       <content type="url" href="gadgets/nodeUtilization"/>
       <positioning priority="20" height="1" width="2"/>
       ...
  5. Now locate the Urgent Events Log gadget. Notice that its <positioning> priority value is set to "20". Change it to "30".
  6. <gadget title="Urgent Events Log" id="eventLog">
       <content type="url" href="gadgets/eventLog"/>
       <positioning priority="30" height="1" width="2"/>
       ...
  7. Save the gadgets.xml file.

Your changes will take immediate effect once you refresh the Viewpoint Homepage.

Gadget automatic refresh time

By default, gadgets are set to refresh automatically once every hour (or 3600 seconds). You can change how often gadgets automatically refresh in the gadgets.xml file.

For performance reasons, it is recommended that you do not set the automatic refresh time for anything less than 60 seconds.

To configure the automatic refresh time

  1. Open the gadgets.xml file in the $VIEWPOINT_HOME/hpc directory.
  2. The gadgets all appear under the <gadget-list> element.

  3. Locate the gadget you want to configure (for example, the Virtual Machine Utilization gadget), and locate the <params> element.
  4. Nested inside is the "InternalRefresh" <param>. Set the value attribute to the number of seconds you want in between automatic refreshes. For example, if you want 15 minutes (900 seconds) between refreshes, you would do the following:
  5. <gadget title="Virtual Machine Utilization" id="vmUtilization">
       ...
       <params>
          <param name="InternalRefresh" value="900" />
          <!-- Required for jQuery Data Load -->
       </params>
       ...
  6. Save the gadgets.xml file.

Your changes will take immediate effect once you refresh the Viewpoint Homepage.

Related topics