Changeset 73 for trunk


Ignore:
Timestamp:
Jun 24, 2011, 3:26:20 PM (8 years ago)
Author:
robert@…
Message:
  • Fixed nullpointer bug in querying
  • Changed order of classification buttons
  • Added content-length to file downloads
Location:
trunk/grails-app
Files:
1 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/config-development.properties

    r52 r73  
    2020gscf.baseURL=http://localhost:8080/gscf
    2121massSequencing.consumerID=http://localhost:8184/massSequencing
    22 massSequencing.synchronization=false
     22massSequencing.synchronization=true
    2323
    2424# File uploads
  • trunk/grails-app/controllers/nl/tno/massSequencing/AssaySampleController.groovy

    r71 r73  
    126126                def processId = params.processId;
    127127               
    128                 // Export the sequences and quality scores
    129                 response.setHeader "Content-disposition", "attachment; filename=" + session.process[ processId ].name  + ".zip"
     128                // Retrieve the file
     129                def file = fileService.get( session.process[ processId ].filename );
     130
    130131                try {
    131                         response.outputStream << fileService.get( session.process[ processId ].filename ).newInputStream();
     132                        // Send the file to the user
     133                        response.setHeader "Content-disposition", "attachment; filename=" + session.process[ processId ].name  + ".zip"
     134                        response.setHeader "Content-Length", file.size().toString();
     135                       
     136                        response.outputStream << file.newInputStream();
    132137                        response.outputStream.flush();
    133138                } catch( Exception e ) {
  • trunk/grails-app/controllers/nl/tno/massSequencing/files/FileController.groovy

    r72 r73  
    127127                // Return the file
    128128                response.setHeader "Content-disposition", "attachment; filename=${filename}"
     129                response.setHeader "Content-Length", file.size().toString()
    129130                response.outputStream << file.newInputStream()
    130131                response.outputStream.flush()
  • trunk/grails-app/controllers/nl/tno/massSequencing/query/QueryController.groovy

    r67 r73  
    383383                               
    384384                                        // Copy value
    385                                         if( formCriterion.factor.isDouble() )
     385                                        if( formCriterion.factor?.isDouble() )
    386386                                                criterion.factor = Double.parseDouble( formCriterion.factor );
    387387                                       
  • trunk/grails-app/services/nl/tno/massSequencing/FastaService.groovy

    r72 r73  
    811811               
    812812                // Export an excel file with information about the classification samples
    813                 zipFile.putNextEntry( new ZipEntry( name + "classification.summary" ) );
     813                zipFile.putNextEntry( new ZipEntry( name + ".classification.summary" ) );
    814814                classificationService.exportClassifications( assaySamples, zipFile );
    815815                zipFile.flush();
  • trunk/grails-app/services/nl/tno/massSequencing/integration/SynchronizationService.groovy

    r67 r73  
    497497                       
    498498                a.save()
    499 
     499               
     500               
     501                // Remove authorization from other users
     502                if( study.isDirty )
     503                        Auth.executeUpdate( "DELETE FROM Auth WHERE study = :study AND user <> :user", [ 'study': study, 'user': user ] )
     504               
    500505                return a
    501506        }
  • trunk/grails-app/views/classification/percentageClassified.gsp

    r62 r73  
    4343                </form>
    4444                <p class="options">
    45                         <a class="fasta" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="assaySample" action="exportAsFasta" />' ); return false;">Export as fasta</a>
    4645                        <a class="classification" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="classification" action="show" />' ); return false;">Show classification</a>
     46                        <a class="fasta" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="assaySample" action="exportAsFasta" />' ); return false;">Export all data</a>
    4747                        <a class="classification_export" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="classification" action="export" />' ); return false;">Export classification</a>
    4848                        <a class="back" href="${returnUrl}">Return to ${entityType}</a>
  • trunk/grails-app/views/classification/show.gsp

    r63 r73  
    9595                </form>
    9696                <p class="options">
    97                         <a class="fasta" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="assaySample" action="exportAsFasta" />' ); return false;">Export as fasta</a>
    9897                        <a class="classification_percentage" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="classification" action="percentageClassified" />' ); return false;">Percentage classified</a>
     98                        <a class="fasta" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="assaySample" action="exportAsFasta" />' ); return false;">Export all data</a>
    9999                        <a class="classification_export" href="#" onClick="submitFormAbsoluteUrl( $( '#sampleForm' ), '<g:createLink controller="classification" action="export" />' ); return false;">Export classification</a>
    100100                        <a class="back" href="${returnUrl}">Return to ${entityType}</a>
Note: See TracChangeset for help on using the changeset viewer.