Changeset 18
- Timestamp:
- Mar 8, 2011, 11:59:30 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 17 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/application.properties
r6 r18 1 1 #Grails Metadata file 2 # Wed Jan 19 09:55:04CET 20112 #Mon Feb 28 15:08:16 CET 2011 3 3 app.build.display.info=0 4 app.grails.version=1.3. 64 app.grails.version=1.3.7 5 5 app.name=metagenomics 6 6 app.servlet.version=2.4 … … 8 8 plugins.db-util=0.4 9 9 plugins.famfamfam=1.0.1 10 plugins.hibernate=1.3. 610 plugins.hibernate=1.3.7 11 11 plugins.jquery=1.4.4.1 12 12 plugins.jquery-ui=1.8.7 13 plugins.tomcat=1.3. 613 plugins.tomcat=1.3.7 -
trunk/grails-app/conf/BaseFilters.groovy
r14 r18 32 32 userCheck(controller:'*', action:'*') { 33 33 before = { 34 if( actionName == "notifyStudyChange" && controllerName == "rest") {34 if( actionName == "notifyStudyChange" ) { 35 35 return true; 36 36 } … … 40 40 return false 41 41 } 42 43 42 44 43 // We are handling the Rest controller as a special case. The rest calls are made … … 132 131 } else { 133 132 session.sessionToken = "${UUID.randomUUID()}" 134 log.info("SessionToken created, redirecti ong to GSCF to let the user login! (SessionToken: ${session.sessionToken}")133 log.info("SessionToken created, redirecting to GSCF to let the user login! (SessionToken: ${session.sessionToken}") 135 134 136 135 redirect( url: gscfService.urlAuthRemote(params, session.sessionToken) ) -
trunk/grails-app/controllers/nl/tno/metagenomics/RunController.groovy
r14 r18 554 554 } catch( Exception e ) { 555 555 log.error( "Exception occurred during export of sequences. Probably the user has cancelled the download." ); 556 throw e 556 557 } 557 558 } -
trunk/grails-app/controllers/nl/tno/metagenomics/integration/RestController.groovy
r14 r18 2 2 3 3 import grails.converters.* 4 import nl.tno.metagenomics.Study 5 import nl.tno.metagenomics.Sample 6 import nl.tno.metagenomics.Assay 4 import nl.tno.metagenomics.* 7 5 8 6 import org.apache.catalina.connector.Response; … … 185 183 */ 186 184 def getQueryableFieldData = { 185 println "Get queryable Field data: " + params 186 187 187 def entity = params.entity; 188 188 def tokens = params.tokens ?: [] … … 450 450 * {"name":"average quality", "unit":"Phred"} ] 451 451 */ 452 def getMeasurementMeta data = {452 def getMeasurementMetaData = { 453 453 def assayToken = params.assayToken 454 454 def measurementTokens = params.measurementToken … … 461 461 // For now, we don't have any metadata about the measurements 462 462 def measurements = getMeasurementTypes(); 463 def measurementMetadata = [ ]463 def measurementMetadata = [ ] 464 464 465 465 measurementTokens.each { token -> … … 602 602 } 603 603 604 def data = SampleAssay.findAllByAssay( assay );604 def data = AssaySample.findAllByAssay( assay ); 605 605 def measurements = getMeasurementTypes() 606 606 607 607 def results = [] 608 data.each { sampleAssay->608 data.each { assaySample -> 609 609 measurements.each { type -> 610 def sample = sampleAssay.sample.sampleToken610 def sample = assaySample.sample.sampleToken 611 611 def isMatch = false 612 612 … … 614 614 if( ( measurementTokens.isEmpty() || measurementTokens.contains( type ) ) && 615 615 ( sampleTokens.isEmpty() || sampleTokens.contains( sample ) ) ) { 616 results.push( [ 'sampleToken': sample, 'measurementToken': type, 'value': sampleAssay[ type ] ] )616 results.push( [ 'sampleToken': sample, 'measurementToken': type, 'value': assaySample[ type ] ] ) 617 617 } 618 618 } -
trunk/grails-app/controllers/nl/tno/metagenomics/integration/SynchronizeController.groovy
r17 r18 23 23 def perform = { 24 24 try { 25 if( !session.user ) { 26 throw new Exception( "No user is logged in" ); 27 } 28 25 29 synchronizationService.sessionToken = session.sessionToken 26 30 synchronizationService.user = session.user -
trunk/grails-app/services/nl/tno/metagenomics/SampleExcelService.groovy
r14 r18 304 304 } 305 305 306 // Transpose data and create new headers 307 data = data.transpose(); 308 309 // Add field names in front of the data 310 for( int i = 0; i < data.size(); i++ ) { 311 data[ i ] = [] + fields[ "descriptions" ][ "all" ][ i ] + data[ i ] 312 } 313 306 314 // Create excel file 307 315 def sheetIndex = 0; … … 311 319 312 320 // Put the headers on the first row 313 excelService.writeHeader( wb, fields[ "descriptions" ][ "all"], sheetIndex );314 excelService.writeData( wb, data, sheetIndex, 1);321 //excelService.writeHeader( wb, data[ 0 ], sheetIndex ); 322 excelService.writeData( wb, data, sheetIndex, 0 ); 315 323 316 324 // Auto resize columns -
trunk/grails-app/services/nl/tno/metagenomics/integration/GscfService.groovy
r14 r18 82 82 return user 83 83 } catch( Exception e ) { 84 e.printStackTrace(); 85 return null 84 86 throw new Exception( "Retrieving user details from GSCF failed", e ); 85 87 } … … 328 330 throw new Exception( "Calling GSCF Rest method ${restMethod} failed. Please check log for more information.", e ) 329 331 } 330 332 331 333 switch( connection.responseCode ) { 332 334 case 400: // Bad request … … 337 339 break; 338 340 case 403: // Incorrect authentication 341 println "Not authenticated (" + addr + "): " + connection.responseCode 339 342 throw new NotAuthenticatedException( "User is not authenticated with GSCF." ); 340 343 break; -
trunk/grails-app/views/run/index.gsp
r14 r18 21 21 <g:if test="${runs.size() == 0}"> 22 22 <p> 23 Currently there are no studies available in the database. Click <a href="#" onClick="showAddRunDialog(); return false;">here</a> to add a new run.23 Currently there are no runs available in the database. Click <a href="#" onClick="showAddRunDialog(); return false;">here</a> to add a new run. 24 24 </p> 25 25 </g:if>
Note: See TracChangeset
for help on using the changeset viewer.