Configuring nodes > Creating a composite column in the Node Management table

5.3 Creating a composite column in the Node Management table

The <table> element supports a special kind of column named "composite". The composite column allows you to display a value based on the basic fields listed above by using the value decider framework. Each field can be accessed with <component> elements.

To create a composite column in the Node Management table

  1. Open the nodes.xml file located in the Viewpoint home directory.
  2. Use the <component> element inside the <fields> element. This will display a value based on the basic fields in this Node Management table (see Modifying columns in the Node Management table).
  3. Specify a width and a <title> for the <component>.
  4. Set the <value> element to include the value decider portion that determines the form of the column values. The basic structure of a <composite> element is below:
  5. <composite width="100">
        <title>Column title</title>
        <value>
        ...
        </value>
    </composite>

As an example, you might create a composite value to display both the available disk space and the total configured disk space on nodes and VMs in gigabytes. Disk values are reported directly as given by Moab. If Moab is reporting disk values in megabytes, you could configure the composite value as shown in the example below. This example displays a column value of the form <disk available in GB> / <disk total in GB>.

<composite width="75">
   <title>Disk (GB)</title>
   <value>
      <calculate operation="append-in-order">
         <value order="1">
            <calculate operation="double-to-string" format="#.#">
               <calculate binary-operation="multiply">
                  <first>
                     <component id="disk-available"/>
                  </first>
                  <second>.0001</second>
               </calculate>
            </calculate>
         </value>
         <value order="2"> / </value>
         <value order="3">
            <calculate operation="double-to-string" format="#.#">
               <calculate binary-operation="multiply">
                  <first>
                     <component id="disk-total"/>
                  </first>
                  <second>.0001</second>
               </calculate>
            </calculate>
         </value>
      </calculate>
   </value>
</composite>

Related topics