Changeset 2091
- Timestamp:
- Nov 7, 2011, 4:28:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/visualization/VisualizeController.groovy
r2090 r2091 194 194 def urlVars = "assayToken="+assay.assayUUID 195 195 try { 196 callUrl = ""+assay.module.url + "/rest/getMeasurement s/query?"+urlVars196 callUrl = ""+assay.module.url + "/rest/getMeasurementMetaData/query?"+urlVars 197 197 def json = moduleCommunicationService.callModuleRestMethodJSON( assay.module.url /* consumer */, callUrl ); 198 198 println(callUrl) 199 199 def collection = [] 200 200 json.each{ jason -> … … 204 204 collection.each { field -> 205 205 // For getting this field from this assay 206 fields << [ "id": createFieldId( id: field , name: field, source: assay.id, type: ""+assay.name), "source": source, "category": ""+assay.name, "name": field]206 fields << [ "id": createFieldId( id: field.name, name: field.name, source: ""+assay.id, type: ""+assay.name, unit: (field.unit?:"")), "source": source, "category": ""+assay.name, "name": field.name + (field.unit?" ("+field.unit+")":"") ] 207 207 } 208 208 } catch(Exception e){ … … 283 283 // This is a single field. Format it and return the result. 284 284 if(type=="domainfields"){ 285 fields << [ "id": createFieldId( id: collectionOfFields.name, name: collectionOfFields.name, source: source, type: category ), "source": source, "category": category, "name": collectionOfFields.name]285 fields << [ "id": createFieldId( id: collectionOfFields.name, name: collectionOfFields.name, source: source, type: category, unit: (collectionOfFields.unit?:"") ), "source": source, "category": category, "name": collectionOfFields.name + (collectionOfFields.unit?" ("+collectionOfFields.unit+")":"") ] 286 286 } 287 287 if(type=="templatefields"){ 288 fields << [ "id": createFieldId( id: collectionOfFields.id.toString(), name: collectionOfFields.name, source: source, type: category ), "source": source, "category": category, "name": collectionOfFields.name]288 fields << [ "id": createFieldId( id: collectionOfFields.id.toString(), name: collectionOfFields.name, source: source, type: category, unit: (collectionOfFields.unit?:"") ), "source": source, "category": category, "name": collectionOfFields.name + (collectionOfFields.unit?" ("+collectionOfFields.unit+")":"")] 289 289 } 290 290 return fields … … 703 703 def return_data = [:] 704 704 return_data[ "type" ] = type 705 return_data.put("yaxis", ["title" : parseFieldId( fields[ valueAxis ] ).name, "unit" : "", "type":valueAxisTypeString ])706 return_data.put("xaxis", ["title" : parseFieldId( fields[ groupAxis ] ).name, "unit": "", "type":groupAxisTypeString ])705 return_data.put("yaxis", ["title" : parseFieldId( fields[ valueAxis ] ).name, "unit" : parseFieldId( fields[ valueAxis ] ).unit, "type":valueAxisTypeString ]) 706 return_data.put("xaxis", ["title" : parseFieldId( fields[ groupAxis ] ).name, "unit": parseFieldId( fields[ groupAxis ] ).unit, "type":groupAxisTypeString ]) 707 707 return_data.put("series", [[ 708 708 "x": groupedData[ groupAxis ].collect { it.toString() }, … … 717 717 def return_data = [:] 718 718 return_data[ "type" ] = type 719 return_data.put("yaxis", ["title" : yName, "unit" : "", "type":valueAxisTypeString ])720 return_data.put("xaxis", ["title" : parseFieldId( fields[ groupAxis ] ).name, "unit": "", "type":groupAxisTypeString ])719 return_data.put("yaxis", ["title" : yName, "unit" : parseFieldId( fields[ valueAxis ] ).unit, "type":valueAxisTypeString ]) 720 return_data.put("xaxis", ["title" : parseFieldId( fields[ groupAxis ] ).name, "unit": parseFieldId( fields[ groupAxis ] ).unit, "type":groupAxisTypeString ]) 721 721 return_data.put("series", [[ 722 722 "name": yName,
Note: See TracChangeset
for help on using the changeset viewer.