Ignore:
Timestamp:
Oct 10, 2013, 9:10:48 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #481: Register prepared flow cells

Added support for registering the HiSeq? used for sequencing. Actual hardware items must be created by the server administrator with the subtype 'Sequencer'. Automatic selection follow the same pattern as for protocols, eg. the last added item which is set as 'project default' is the default choice.

File:
1 edited

Legend:

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

    r2049 r2057  
    168168  setInnerHTML('fc-data', html);
    169169 
    170   // Load mRNA protocols
     170  // Load clustering protocols
    171171  var clusterProtocols = getProtocols('CLUSTER_PROTOCOL');
    172172  for (var i = 0; i < clusterProtocols.length; i++)
     
    181181  }
    182182
     183  // Load sequencing machines
     184  var sequencers = getHardware('SEQUENCER');
     185  for (var i = 0; i < sequencers.length; i++)
     186  {
     187    var sequencer = sequencers[i];
     188    frm.sequencer[frm.sequencer.length] = new Option(sequencer.name, sequencer.id, sequencer.isDefault);
     189    setInputStatus('sequencer', '', 'valid');
     190  }
     191  if (frm.sequencer.length == 0)
     192  {
     193    frm.sequencer[0] = new Option('- none -', '');
     194  }
     195
     196 
    183197  frm['fc.'+selectedFlowCells[0].id+'.id'].focus();
    184198}
     
    208222  return response.protocols;
    209223}
     224
     225function getHardware(subtype)
     226{
     227  var request = Ajax.getXmlHttpRequest();
     228  try
     229  {
     230    showLoadingAnimation('Loading ' + subtype + ' protocols...');
     231    var url = '../Hardware.servlet?ID=<%=ID%>&cmd=GetHardware&subtype='+subtype;   
     232    request.open("GET", url, false); 
     233    request.send(null);
     234  }
     235  finally
     236  {
     237    hideLoadingAnimation();
     238  }
     239
     240  if (debug) Main.debug(request.responseText);
     241  var response = JSON.parse(request.responseText); 
     242  if (response.status != 'ok')
     243  {
     244    setFatalError(response.message);
     245    return false;
     246  }
     247  return response.hardware;
     248}
     249
    210250
    211251function outcomeOnChange()
     
    357397  frm.sequencingOperator.disabled = true;
    358398  frm.clusterProtocol.disabled = true;
     399  frm.sequencer.disabled = true;
    359400  frm.comments.disabled = true;
    360401 
     
    373414 
    374415  submitInfo.clusterProtocol = parseInt(frm.clusterProtocol.value, 10);
     416  submitInfo.sequencer = parseInt(frm.sequencer.value, 10);
    375417  submitInfo.failed = document.getElementById('outcomeSuccess').checked ? false : true;
    376418  submitInfo.clusterDate = frm.clusterDate.value;
     
    555597        <td class="prompt">Protocol</td>
    556598        <td class="input" colspan="2"><select style="width:90%" name="clusterProtocol" id="clusterProtocol"
    557           onkeypress="focusOnEnter(event, 'comments')"></select></td>
     599          onkeypress="focusOnEnter(event, 'sequencer')"></select></td>
    558600        <td class="status" id="clusterProtocol.status"></td>
    559601        <td class="help"><span id="clusterProtocol.message" class="message" style="display: none;"></span>
    560602          Select the protocol which was used in the clustering.
     603        </td>
     604      </tr>
     605      <tr valign="top">
     606        <td class="prompt">HiSeq</td>
     607        <td class="input" colspan="2"><select style="width:90%" name="sequencer" id="sequencer"
     608          onkeypress="focusOnEnter(event, 'comments')"></select></td>
     609        <td class="status" id="sequencer.status"></td>
     610        <td class="help"><span id="sequencer.message" class="message" style="display: none;"></span>
     611          Select the HiSeq machine which is used for sequencing.
    561612        </td>
    562613      </tr>
Note: See TracChangeset for help on using the changeset viewer.