Ignore:
Timestamp:
Mar 16, 2012, 9:44:17 AM (11 years ago)
Author:
Nicklas Nordborg
Message:

References #370: Export run parameters to Caliper XML file

Added entry point to the run parameters exporter in the reggie wizard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/rnaqc_plate_export.jsp

    r1550 r1564  
    3939var debug = false;
    4040var rnaQcBioPlates = null
     41var runParameterConfigurations = null;
    4142
    4243function init()
     
    6061    setFatalError(msg);
    6162  }
    62 }
    63 
     63 
     64  getConfigurationsForRunParametersExporter();
     65  var exportHtml = makeButton('Sample names (csv)', "goExport('SAMPLE_NAMES')");
     66  for (var i = 0; i < runParameterConfigurations.length; i++)
     67  {
     68    var config = runParameterConfigurations[i];
     69    exportHtml += makeButton('Run parameters: '+config.name + ' (xml)', "goExport('"+config.id+"')");
     70  }
     71 
     72  setInnerHTML('export', exportHtml);
     73}
     74
     75
     76function makeButton(title, onClick)
     77{
     78  var btn = '';
     79  btn += '<span class="link" onclick="'+onClick+'">';
     80  btn += '<img src="images/export.png">&nbsp;';
     81  btn += title+'</span><br>\n';
     82  return btn;
     83}
     84
     85function getConfigurationsForRunParametersExporter()
     86{
     87  var request = Ajax.getXmlHttpRequest();
     88  var url = 'RnaQc.servlet?ID=<%=ID%>&cmd=GetConfigurationsForRunParametersExporter';   
     89  request.open("GET", url, false);
     90  request.send(null);
     91
     92  if (debug) Main.debug(request.responseText);
     93  var response = JSON.parse(request.responseText); 
     94  if (response.status != 'ok')
     95  {
     96    setFatalError(response.message);
     97    return false;
     98  }
     99 
     100  runParameterConfigurations = response.configurations;
     101}
    64102
    65103function getActiveRnaQcBioPlates()
     
    84122
    85123
    86 function goExport()
     124function goExport(exporter)
    87125{
    88126  var frm = document.forms['reggie'];
    89127  var bioPlateId = frm.bioPlates[frm.bioPlates.selectedIndex].value;
    90   var url = 'RnaQc.servlet?ID=<%=ID%>&cmd=ExportSampleNamesForCaliper&bioPlateId='+bioPlateId;
     128 
     129  var url;
     130  if (exporter == 'SAMPLE_NAMES')
     131  {
     132    url = 'RnaQc.servlet?ID=<%=ID%>&cmd=ExportSampleNamesForCaliper&bioPlateId='+bioPlateId;
     133  }
     134  else
     135  {
     136    url = 'RnaQc.servlet?ID=<%=ID%>&cmd=ExportRunParameters&bioPlateId='+bioPlateId+'&configurationId='+exporter;
     137  }
    91138  window.location = url;
    92139}
     
    100147  <p:path><p:pathelement
    101148    title="Reggie" href="<%="index.jsp?ID="+ID%>"
    102     /><p:pathelement title="RNA quality control - Export Caliper sample names"
     149    /><p:pathelement title="RNA quality control - Export Caliper sample names and run parameters"
    103150    /></p:path>
    104151
     
    134181        <td class="status" id="bioplates.status"></td>
    135182        <td class="help"><span id="bioplates.message" class="message" style="display: none;"></span>
    136           Select the bioplate to export sample names from.
     183          Select the bioplate to export sample names or run parameters from.
    137184          <p>
    138185          The list contain RNAQC bioplates without quality score data (determined by
    139           absence of QCRunDate annotation). 
     186          absence of QCRunDate annotation).
    140187          <p>
    141188          Tip! You can run the exporter for any bioplate as a regular plug-in by selecting
    142189          a bioplate from the list at <a
    143190          href="<%=request.getContextPath()%>/biomaterials/bioplates/index.jsp?ID=<%=ID%>"
    144           >Biomaterial LIMS › Bioplates</a> and then use the <b>Export</b> button.
     191          >Biomaterial LIMS › Bioplates</a> and then use the <b>Export</b> button.
     192        </td>
     193      </tr>
     194     
     195      <tr valign="top">
     196        <td class="prompt">Export</td>
     197        <td class="input" id="export" style="white-space: nowrap;">
     198         
     199        </td>
     200        <td class="status" id="export.status"></td>
     201        <td class="help"><span id="export.message" class="message" style="display: none;"></span>
     202          Select what to export. Typically, you'll need the sample name file and the standard and
     203          high sensitivity run files.
    145204        </td>
    146205      </tr>
     
    150209  </table>
    151210 
    152  
    153211  <div class="messagecontainer error" id="errorMessage" style="display: none; width: 800px; margin-left: 20px; margin-bottom: 0px;"></div>
    154212 
    155213  <div id="done" class="success" style="display: none; width: 800px; margin-left: 20px; margin-top: 20px;"></div>
    156  
    157   <table style="margin-left: 20px; margin-top: 10px;" class="navigation">
    158     <tr>
    159       <td><base:button id="goexport" title="Export" image="<%=home+"/images/export.png"%>" onclick="goExport()"/></td>
    160       <td id="gonext.message" class="message"></td>
    161     </tr>
    162   </table>
     214
    163215  </form>
    164216  </div>
Note: See TracChangeset for help on using the changeset viewer.