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.
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:
refresh /
> - Refresh page.delete /
> - Delete selected reservation.generic-command /
> - Perform functions not built in to Viewpoint.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:
tooltip
(optional) - Tooltip to be displayed on the button when the mouse hovers over it.label
(optional) - Text to be displayed either on the button or, if an image is specified, to its right side.image-url
(optional) - Path to an icon that will be used to display the button. 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:
cpu
> disk-size
> duration
> - Pseudo-field that derives the duration of an object from its start and end date. end-date
> - See Filtering Results for date range syntax.id
> label
> memory
> name
> - Pseudo-field that displays a reservation's label if it exists, and if Viewpoint is configured to use reservation labels; if the label is not displayed, the reservation's ID is instead.owner
> resource-group
> - Corresponds to the reservation's resource string value in Moab.start-date
> - See Filtering Results for date range syntax.state
> - Either active or inactive; values are case-insensitive.All field types have these attributes:
primary
(optional) - Default is "false"
. Specifies whether this field forms part or all of primary key for the table records. visible
(optional) - Default is "true"
. Specifies whether the column should displayed or be hidden. width
(optional) - Specifies the width in pixels of the column. All field types have this child element:
title
> (optional) - The name of the column to be displayed to the user. 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>
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.
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.
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.
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.
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:
variables
> - This is used to display a list of all variables on the record.authorization
> - This is used to display ACL information in a text area.header
> - This is used to add a line of header text meant to be a sub-header inside a details section or to separate groups of values in a details section.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.