view gmql_rest_queries_monitor.xml @ 0:4bfc6a2c4855 draft default tip

planemo upload for repository https://github.com/lu-brn/gmql-galaxy commit 953ee36ceda5814dc9baa03427bc0eb4ee2e93bd-dirty
author geco-team
date Tue, 26 Jun 2018 08:58:28 -0400
parents
children
line wrap: on
line source

<tool id="gmql_queries_monitor" name="GMLQ Jobs Monitor" version="0.1.1">
  <description>List the user's jobs and their status</description>
  <macros>
    <import>gmql_rest_macros.xml</import>
  </macros>
  <command><![CDATA[
      python $__tool_directory__/gmql_rest_queries.py
      -user=$authToken
      #if $control.operation == 'list'
       -cmd=jobs
       -log=$jobs_list
      #else :
       -cmd=stop
       -log=$stop_output
       -job=$control.job
      #end if
      ]]></command>
  <code file="dynamic_utils.py">
      <hook validate_input="validate" />
  </code>
  <inputs>
	<param format="gmql_user" name="authToken" type="data" label="Select user" />
    <conditional name="control">
            <param name="operation" type="select" display="radio" multiple="false" label="Select the desired action" >
                <option value="list">View Active Queries</option>
                <option value="stop">Stop a running query</option>
            </param>
                <when value="list">
                  <!-- do nothing -->
                </when>
                <when value="stop">
                    <param name="user_jobs" type="data" format="tabular" label="Select User's jobs list" />
                    <param name="job" type="select" label="Select running job to stop">
		                <options from_dataset="user_jobs">
                            <column name="value" index="0" />
                            <filter column="1" type="static_value" value="RUNNING" />
                        </options>
                    </param>
                </when>
    </conditional>
  </inputs>
  <outputs>
    <data format="tabular" name="jobs_list" label="${authToken.name.split()[0].rstrip('')} Jobs" >
      <filter>control['operation'] == 'list'</filter>
      <actions>
            <action name="column_names" type="metadata" default="Job ID, Status, Message, Datasets name, Elapsed time" />
      </actions>
    </data>
    <data format="txt" name="stop_output" label="Stopping Outcome (Job ${control.job})" >
        <filter>control['operation'] == 'stop'</filter>
    </data>
  </outputs>
  <tests>
      <test>
          <param name="authToken" value="guest.gmql_user" />
          <conditional name="control">
              <param name="operation" value="list" />
          </conditional>
          <output name="jobs_list" ftype="tabular" >
              <assert_contents>
                    <has_n_columns n="5" />
                </assert_contents>
          </output>
      </test>
  </tests>
  <help>
Once GMQL queries have been created and sent to execution, this tool helps the user to monitor the current jobs and their status.

----

**What it does**

- **View Active Queries**: returns a list of active queries and their status
- **Stop Active Query**: stop the execution of a pending query (provide a list of active queries)

.. class:: warningmark

A gmql_user authentication token is required for every action.

  </help>
  <expand macro="citations" />
</tool>