Custom pages overview

The IBM Spectrum LSF Application Center page customization framework provides APIs to create new web interfaces based on your specific requirements. Each new page and its related workflows are defined through an XML element <pac:service> in the service repository file services.xml.

To create a new page, edit the services.xml file and add an XML element <pac:service> to create a new IBM Spectrum LSF Application Center service, which usually corresponds to a new page in IBM Spectrum LSF Application Center.

Then, click Edit Navigation to integrate the new page into IBM Spectrum LSF Application Center.

You can add or remove pages in the services.xml file and your changes are automatically recognized by IBM Spectrum LSF Application Center when you click Refresh. You do not need to restart IBM Spectrum LSF Application Center.

New page structure

A new page that is supported through this framework is like a normal HTML page with IBM Spectrum LSF Application Center tags (of the form <pac:xxxx>. It can use HTML tags, <pac:xxxx> tags, JavaScript, CSS, and shell scripts.

The <pac:xxxx> tags define user input, trigger events, and connect with scripts and APIs.

Location of services.xml

The location of the services.xml file is PAC_TOP/gui/conf/service/services.xml, where PAC_TOP is the path to the top level IBM Spectrum LSF Application Center installation directory (for example, /opt/pac).

A simple service example

The following XML element defines a simple service:

  1. Show a page with a simple form and a Submit button.

  2. Display a welcome message after the user clicks the Submit button.

<pac:service id="hello_pac"> 
   <pac:option id="USER_NAME" label="@{userName}:" type="text"/>
   <pac:action id="submit" label="@{submit}">
      PAC_TOP/gui/conf/service/buildin/hello.sh hello-pac
      <pac:result type="text/html"/>
   </pac:action>
</pac:service>

The <pac:option> and <pac:action> tags are the basic tags that make up a single <pac:service> section, and each functional <pac:service> section must have at least one option or action.

The options that are defined in XML become variables in the environment, and are used for the execution of the script, together with a rich set of additional information about the context of your execution.