9.2 Configuring Reservation Management

The Reservation Management page consists of a table that displays reservations and a set of buttons above the table that perform operations on a reservation selected in the table. The columns of the table, as well as the buttons above the table, are configured in the reservations.xml file.

<config ...>
  ...
  <manage>
      <controls>
        ...
      </controls>
        <table>
          <fields>
            ...
          </fields>
        </table>
      <details>
        <title>Title goes here</title>
        <controls>
          ...
        </controls>
        <sections>
          <section>
            <title>Section title goes here</title>
            ...
          </section>
        </sections>
      </details>
  </manage>
  ...
</config>

You can modify the <controls> element to configure the buttons and the <fields> element to configure the table columns.

By default, users can only see their own reservations (even administrators). To allow users to see all reservations, they must have the reservation.readall permission.

9.2.1 Buttons

The <controls> element lets you configure which buttons are available, and what actions the user can perform on reservations in the table. The supported buttons are:

By default, users can only perform actions on their own reservations (even administrators). To allow users to perform actions on all reservations, they must have the reservation.updateall permission. Note, though, that any user with the reservation.updateall permission must also have the appropriate administrator level set in the Moab configuration file for Moab to report all existing reservations to the user.

In addition to specifying an action type via the element's name, you can modify the appearance of a button element by using the following attributes:

9.2.2 Fields

The <fields> element has child elements that correspond to table columns. The columns appear in the same order that the child elements are specified. The name of each element corresponds to the type of the column. You must configure at least one field type to be the primary key. The field types are:

All field types have these attributes:

All field types have this child element:

In addition to the above fields, 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. You must specify a width and a title for the <component> element. The contents of the <value> element constitute the value decider portion that determines the form of the column values. The basic structure of a <composite> element is below:

<composite width="100">
  <title>Column title</title>
  <value>
    ... 
  </value>
</composite>

9.2.2.1 Filtering the Results

A filter can be used to display a specific set of reservations based on the field types. For details on how to filter according to field type, see Filtering Results.

9.2.2.2 User

A user with the reservation.read permission only sees reservations that have their username declared in the reservations access control list. If a user has the permission "reservation.readall", then that user can see all reservations.

9.2.2.3 Primary Key

In order for many features of the Reservation Management page to work properly, you must configure at least one field to be a primary key field. We strongly recommend creating an <id /> field as the sole primary key field. You can make this field invisible if you don't want users to see it.

9.2.3 Details Pane

The Reservation Management page contains a panel for displaying a reservation in detail. These sections are configured in the <details> child element of <manage>. You can configure a title, a set of buttons, and a list of sections that display information in these panels. The title can contain field references that are replaced with the value of the field of the current object being viewed. Allowable fields are those available for the reservation table. Most of these fields are specified by prefixing a field name with a dollar sign ($) and optionally wrapping it in curly brackets({}). Examples include $id, ${name}, and $cpu. Additionally, you can display a variable in the title using the map variable syntax, which suffixes the field name with a key enclosed in square brackets. For example, the reference $variable[RSVID] would be substituted with the value of the variable "RSVID" in the title.

The only supported buttons in the details pane are Refresh and Delete.

9.2.3.1 Sections

Each details panel section specified in XML corresponds to a collapsible section in the details panel. A section itself consists of a title (with no variable interpolation) and a <fields> element that contains a list of fields. These fields have names that correspond directly to the table fields described previously in the fields section.

In addition, the following fields are supported:

Editable Fields

The only editable field is the reservation details <end-date> field. This field allows a user to select an end date with a date picker at the granularity of days instead of months and provides no means of configuring any logic related to fiscal year end dates.