Moab Viewpoint
Configuring Job Management

Configuring Job Management

The job management page consists of a table that displays jobs and a set of buttons above the table that perform operations on a job selected in the table. The columns of the table, as well as the buttons above the table, are configured in the jobs.xml file.

<jobs ...>
  ...
  <job-management>
      <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>
  </job-management>
  ...
</jobs>

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 jobs (even administrators). To allow users to see all jobs, they must have the job.readall permission.

Buttons

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

  • <cancel> - Cancel selected job.
  • <checkpoint> - Checkpoint selected job.
  • <download-stderr> - Downloads the standard error file of a completed job.
  • <download-stdout> - Downloads the standard output file of a completed job.
  • <get-output> - Loads the job output page where streaming job output can be viewed.
  • <hold> - Add user hold to selected job.
  • <refresh> - Refresh page.
  • <release> - Release selected job.
  • <requeue> - Requeue selected job.
  • <suspend> - Suspend selected job.
  • <unhold> - Remove user hold from selected job.

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

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

  • tooltip (optional) - Tool-tip 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.

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:

  • <account>
  • <drmjid>
  • <expected-state>
  • <flags>
  • <holds>
  • <group>
  • <id>
  • <name>
  • <node-count>
  • <memory>
  • <proc-count>
  • <qos>
  • <run-priority>
  • <start-priority>
  • <user>
  • <variable>
    Note The <variable> field requires a <name> attribute that represents the name of the variable to be displayed in the column.
  • <vm-usage-policy>
  • <wallclock-requested>

All field types have the same three attributes:

  • visible (optional) - Specifies whether the column should displayed or be hidden. Default is "true".
  • width (optional) - Specifies the width, in pixels, of the column.
  • primary (optional) - Specifies whether this field forms a part, or all, of the primary key for the job records. Default is "false".

The name of a column can be specified with the <title> child element in any field type. Text in a <title> child element is displayed to the user as the name of the column.

Primary Key

In order for many features of the job 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.

Details Pane

The job details pane is configured in a similar element hierarchy as the job management page. The <details> element has three child elements:

Title

The <title> child element contains the field references that are replaced with the value of the field of the current object being viewed. Any scalar field types are allowed. Fields are specified by prefixing a field name with a dollar sign ($) and optionally wrapping it in curly brackets. Examples include $id, ${name}, and $expected-state. Job variable can also appear in the title by using a map variable syntax, which suffixes the field name with a key enclosed in square brackets. For example, the reference $variable[aitId] would be substituted with the value of the job variable "aitId" in the title.

Buttons

The details pane contains a <controls> section that accepts the same child elements as the <controls> element for the above-table buttons on the Job Management page. Both <controls> elements support an arbitrary menu structure, but that structure is more likely to be used in the details pane. Arbitrarily nested menus can thus be created. Besides containing child elements, a menu element can also specify a boolean attribute vertical, which defaults to "true", that specifies the menu's layout direction. Furthermore, a menu itself can have permissions just like a button. If a user doesn't have permissions to view a menu, then he or she will not see the menu or any of its sub-elements. An example <controls> configuration follows:

<controls>
  <menu label="Job Actions" />
    <permissions>
      <permission name="job.update"/>
    </permissions>
    <cancel />
    <hold />
    <suspend />
    <requeue />
  </menu>
</controls>

Sections

The <sections> element has one child element, <section>. Each specified <section> corresponds to a collapsible section in the details pane. The <section> element has two child elements:

  • <title>
  • <fields>

In addition to supporting all the table field types, the details pane <fields> element has five child elements:

  • <variables> - Used to display a list of all the current job variables.
  • <messages> - Used to display a list of all messages currently associated with the job.
  • <header> - Used to add a line of header text meant to be used as a sub-header inside a details section or to separate groups of values in a details section.
  • <download-stdout> - Provides a link to download the standard output of a completed job.
  • <download-stderr> - Provides a link to download the standard error of a completed job.

Many of the child elements of <fields> can be edited in the details pane by setting editable="true" in the child elements. If at least one field is marked as editable, the job details section displays a Save button. The following field types are editible:

  • account
  • class
  • group
  • name
  • qos
  • wallclock-requested
  • variable
  • variables

An example <sections> configuration is:

<sections>
  <section>
    <title>Credentials</title>
    <fields>
      <user />
      <group editable="true" />
      <account editable="true" />
    </fields>
  </section>
  <section>
    <title>Variables</title>
    <fields>
      <variables editable="true" />
    </fields>
  </section>
</sections>