Changeset 16 for trunk/grails-app
- Timestamp:
- Feb 28, 2011, 10:46:51 AM (12 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/config-development.properties
r7 r16 7 7 # server URL 8 8 grails.serverURL=http://localhost:8184/metagenomics 9 grails.server.port.http=8184 9 10 10 11 # DATABASE -
trunk/grails-app/controllers/nl/tno/metagenomics/integration/SynchronizeController.groovy
r4 r16 10 10 11 11 if( !redirectUrl ) 12 redirectUrl = g.createLink( controller: ' study' );12 redirectUrl = g.createLink( controller: 'run' ); 13 13 14 14 // Set the date of last synchronization to now. Doing it here, prevents the … … 18 18 // etc... 19 19 // synchronizationService.lastFullSynchronization = new Date(); 20 21 20 [ url: redirectUrl ] 22 21 } 23 22 24 23 def perform = { 25 synchronizationService.sessionToken = session.sessionToken 26 synchronizationService.user = session.user 27 28 synchronizationService.fullSynchronization(); 29 30 render ""; 24 try { 25 synchronizationService.sessionToken = session.sessionToken 26 synchronizationService.user = session.user 27 28 synchronizationService.fullSynchronization(); 29 render ""; 30 } catch( Exception e ) { 31 // Catch all exceptions, show them to the user (by rendering a text message) and print a stacktrace 32 log.error "Exception during full synchronization: " + e.getMessage() 33 e.printStackTrace() 34 35 render "An error occurred during synchronization (" + e.class?.name + "): " + e.getMessage(); 36 } 31 37 } 32 38 } -
trunk/grails-app/domain/nl/tno/metagenomics/auth/User.groovy
r7 r16 15 15 16 16 static mapping = { 17 table 'gscfuser' 17 18 auth cascade: "all-delete-orphan" 18 19 } -
trunk/grails-app/services/nl/tno/metagenomics/integration/SynchronizationService.groovy
r14 r16 634 634 // Update the sample object if necessary 635 635 sampleFound.name = gscfSample.name 636 sampleFound.subject = gscfSample.subject 637 sampleFound.event = gscfSample.event + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" )636 sampleFound.subject = gscfSample.subject.toString() 637 sampleFound.event = gscfSample.event.toString() + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" ) 638 638 sampleFound.save(); 639 639 } else { … … 648 648 // Update the sample object if necessary 649 649 sampleFound.name = gscfSample.name 650 sampleFound.subject = gscfSample.subject 651 sampleFound.event = gscfSample.event + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" )650 sampleFound.subject = gscfSample.subject.toString() 651 sampleFound.event = gscfSample.event.toString() + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" ) 652 652 sampleFound.save(); 653 653 } else { … … 656 656 // If it doesn't exist, create a new object 657 657 sampleFound = new Sample( sampleToken: gscfSample.sampleToken, name: gscfSample.name, study: assay.study ); 658 sampleFound.subject = gscfSample.subject 659 sampleFound.event = gscfSample.event + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" )658 sampleFound.subject = gscfSample.subject.toString() 659 sampleFound.event = gscfSample.event.toString() + ( gscfSample.startTime ? " (" + gscfSample.startTime + ")" : "" ) 660 660 assay.study.addToSamples( sampleFound ); 661 661 sampleFound.save(); -
trunk/grails-app/views/synchronize/full.gsp
r6 r16 26 26 window.location.refresh(); 27 27 } else { 28 alert( "Redirect to: ${url.encodeAsJavaScript()}" ); 28 29 if( confirm( "Would you like to continue to the original page?") ) { 29 30 window.location.replace( "${url.encodeAsJavaScript()}" );
Note: See TracChangeset
for help on using the changeset viewer.