Ignore:
Timestamp:
May 7, 2013, 1:31:46 PM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #473: Register library processing results

The Caliper importer now has an option to allow matching samples using the location coordinate. The reason is that the Caliper software for some reason seems to forget the sample name for a few positions and only output the location. There is a limitation so that at most half of the samples on a plate can be matched this way. Otherwise there is a risk that a file can be imported to a plate that it doesn't belong to.

File:
1 edited

Legend:

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

    r1961 r1963  
    253253  if (lastPrefix == 'welltable')
    254254  {
    255     preValidateCsvFile();
     255    setTimeout(preValidateCsvFile, 100);
    256256  }
    257257  else if (lastPrefix == 'qubitcsv')
     
    308308  }
    309309 
    310   var url = '../LibPrep.servlet?ID=<%=ID%>&cmd=PreValidateCaliperWellTable&csv='+csvId;
     310  Main.addClass(document.body, 'please-wait');
     311  setInputStatus('welltable', 'Checking...', 'checking');
     312  var url = '../LibPrep.servlet?ID=<%=ID%>&cmd=PreValidateCaliperWellTable&csv='+csvId+'&bioplate='+frm.bioplate.value;
    311313 
    312314  var request = Ajax.getXmlHttpRequest();
    313   request.open("POST", url, false);
     315  Ajax.setReadyStateHandler(request, onWellTableValidated);
     316  request.open("POST", url, true); 
    314317  request.send('');
    315  
     318}
     319
     320function onWellTableValidated(request)
     321{
     322  Main.removeClass(document.body, 'please-wait');
    316323  if (debug) Main.debug(request.responseText);
    317324  var response = JSON.parse(request.responseText); 
    318  
     325  var numWarnings = 0;
    319326  if (response.messages && response.messages.length > 0)
    320327  {
    321     var messages = '<ul>';
     328    var msg = '<ul>';
    322329    for (var i = 0; i < response.messages.length; i++)
    323330    {
    324       messages += '<li>' + response.messages[i];
     331      var msgLine = response.messages[i];
     332      if (msgLine.indexOf('[Warning]') >= 0)
     333      {
     334        msg += '<li class="warning">' + msgLine.replace('[Warning]', '');
     335        numWarnings++;
     336      }
     337      else
     338      {
     339        msg += '<li>' + msgLine;
     340      }
    325341    }
    326     messages += '</ul>';
    327     setInnerHTML('messages', messages);
     342    msg += '</ul>';
     343    setInnerHTML('messages', msg);
    328344    Main.show('messages');
    329345  }
     
    340356  }
    341357
    342   setInputStatus('welltable', '', 'valid');
     358  setInputStatus('welltable', '', numWarnings > 0 ? 'warning' : 'valid');
    343359  wellTableIsValid = true;
    344360}
     
    398414  if (!step2IsValid()) return;
    399415 
     416  Main.hide('messages');
    400417  Main.hide('goregister');
    401418  Main.hide('gocancel');
     
    520537  {
    521538    var stored = window.localStorage.getItem('reggie.libplate.' + libPlateId + '.info');
    522     if (debug) Main.debug(stored);
     539    if (debug) Main.debug(libPlateId + ': ' + stored);
    523540    return stored ? JSON.parse(stored) : null;
    524541  }
     
    531548
    532549</script>
     550<style>
     551body.please-wait
     552{
     553  cursor: wait !important;
     554}
     555</style>
    533556
    534557</base:head>
Note: See TracChangeset for help on using the changeset viewer.