7.2 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.

7.2.1 Buttons

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

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.

7.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 the same three attributes:

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.

7.2.2.1 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.

7.2.3 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:

7.2.3.1 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.

7.2.3.2 Buttons

The Job 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>

7.2.3.3 Sections

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

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

Many of the child elements of <fields> can be edited in the Job 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 editable:

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>