Project

General

Profile

Actions

How to add a launch page » History » Revision 4

« Previous | Revision 4/16 (diff) | Next »
Amber Herold, 08/15/2012 10:49 AM


How to add a job launch page to the Appion pipeline

  1. Add a php page with the basic appion template
    Most of our launch pages are php files with at leat 2 functions, one to create a form for the user to fill out, and another to build a job command when the user submits the form. You can copy an existing PHP file such as runSimple.php to create your new launch page. To give your page the Appion processing page look and feel with the header and side menu, be sure the functions processing_header($title,$heading,$javascript) and processing_footer() are called.
    1. Modifying the createForm() function
      The create form function outputs the html needed for your form. The myami/myamiweb/processing/inc/forms directory holds reusable form classes based on the basicForm.inc class. Any combination of these can be used to add parameters to your form with little knowlege of html. You may also create a new form class to define the parameters specific to your job command. More on that later.
  2. Add a link to your page in the menuprocessing.php file or from another page
    The menuprocessing file is a bit tricky to work with.
  3. Create a new form class for your package specific parameters
    You can copy simpleParamsForm.inc as a template for your own form parameters. There are 2 primary functions to define.
    1. Define the constructor
      This is where all your parameters are listed. Values passed into the constructor become default values. Validations can be added to any of the parameters.
    2. Define the generateForm() function
      This function outputs html. There are many predefined parameter fields that can be used to build your form.
  4. Add pop-up help messages to help.js
    Located at myami/myamiweb/processing/js/help.js.
    1. Add a new namespace for your form, you can copy the 'simple' section. Don't forget any commas.
    2. add a help string for each of the parameter keys in your form
    3. make sure $javascript .= writeJavaPopupFunctions(); is in your createForm() function in your php launch page prior to the processing header function.
  5. Add a publication reference for the package you are using
    1. Edit /myami/myamiweb/processing/inc/publicationList.inc to include an entry for any references you need to add to your launch page.
    2. publications can be added to a page with the following code:
          $pub = new Publication('appion'); 
          echo $pub->getHtmlTable(); //returns the html reference to the "appion" publication
      

Updated by Amber Herold over 12 years ago · 4 revisions