Changeset 7442
- Timestamp:
- Feb 2, 2018, 9:50:11 AM (5 years ago)
- Location:
- branches/3.11-stable/www/views
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.11-stable/www/views/derivedbioassays/list_bioassays.jsp
r7337 r7442 117 117 118 118 final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType); 119 final ItemQuery<ItemSubtype> jobSubtypesQuery = Base.getSubtypesQuery(Item.JOB); 119 120 120 121 // Query for parent physical bioassays to the current bioassay … … 262 263 property="&rawBioAssays(name)" 263 264 datatype="string" 265 filterable="true" 266 exportable="true" 267 /> 268 <tbl:columndef 269 id="jobType" 270 property="job.itemSubtype" 271 sortproperty="job.itemSubtype.name" 272 exportproperty="job.itemSubtype.name:string" 273 datatype="int" 274 enumeration="<%=Enumeration.fromItems(jobSubtypesQuery.list(dc), "-none-")%>" 275 title="Job type" 276 sortable="true" 264 277 filterable="true" 265 278 exportable="true" … … 790 803 enablePropertyLink="<%=mode.hasPropertyLink()%>" 791 804 /></tbl:cell> 805 <tbl:cell column="jobType"><base:propertyvalue 806 item="<%=item%>" 807 property="job.itemSubtype" 808 enableEditLink="<%=mode.hasEditLink()%>" 809 enablePropertyLink="<%=mode.hasPropertyLink()%>" 810 /></tbl:cell> 792 811 <tbl:cell column="plugin" 793 812 ><base:propertyvalue -
branches/3.11-stable/www/views/derivedbioassays/view_bioassay.jsp
r7265 r7442 332 332 <td style="width: 50%; height: 100%;" class="leftborder"> 333 333 <table class="fullform"> 334 <tbody class="sectionheader">335 <tr>336 <th colspan="2">Job & plug-in parameters</th>337 </tr>338 </tbody>339 334 <tr> 340 335 <th>Job</th> … … 343 338 <tr> 344 339 <th>Plugin</th> 345 <td><%=Base.getLinkedName(ID, plugin, 346 !readPlugin, plugin != null && plugin.hasPermission(Permission.WRITE))%></td> 347 </tr> 348 <tr> 349 <th>Plugin configuration</th> 350 <td><%=Base.getLinkedName(ID, configuration, !readConfiguration, 351 configuration != null && configuration.hasPermission(Permission.WRITE))%></td> 340 <td> 341 <base:propertyvalue item="<%=bioAssay%>" property="job.pluginDefinition" nulltext="<i>External</i>" /> 342 <%=job != null && job.getPluginVersion() != null ? "(" + HTML.encodeTags(job.getPluginVersion()) + ")" : ""%> 343 </td> 352 344 </tr> 353 345 <% 346 if (configuration != null) 347 { 348 %> 349 <tr> 350 <th>Plugin configuration</th> 351 <td><%=Base.getLinkedName(ID, configuration, !readConfiguration, true)%></td> 352 </tr> 353 <% 354 } 354 355 if (job != null) 355 356 { 356 357 %> 358 <tr> 359 <th>Type</th> 360 <td><base:propertyvalue item="<%=job%>" property="itemSubtype" /></td> 361 </tr> 357 362 <tr> 358 363 <th>Started</th> … … 367 372 </td> 368 373 </tr> 369 <tr> 370 <th>Server</th> 371 <td> 372 <%=HTML.encodeTags(job.getServerAndNode())%> 373 </td> 374 </tr> 375 <% 374 <% 375 if (job.getServer() != null) 376 { 377 %> 378 <tr> 379 <th>Server</th> 380 <td> 381 <%=HTML.encodeTags(job.getServerAndNode())%> 382 </td> 383 </tr> 384 <% 385 } 376 386 for (String name : job.getParameterNames()) 377 387 { -
branches/3.11-stable/www/views/rawbioassays/list_rawbioassays.jsp
r7337 r7442 40 40 import="net.sf.basedb.core.FileSet" 41 41 import="net.sf.basedb.core.DataFileType" 42 import="net.sf.basedb.core.ItemSubtype" 42 43 import="net.sf.basedb.core.ItemQuery" 43 44 import="net.sf.basedb.core.Include" … … 126 127 List<DataFileType> fileTypeColumns = new ArrayList<DataFileType>(Base.getDataFileColumns(itemType, null).list(dc)); 127 128 129 final ItemQuery<ItemSubtype> jobSubtypesQuery = Base.getSubtypesQuery(Item.JOB); 130 128 131 // Query for experiments relatated to the current raw bioassay 129 132 final ItemQuery<Experiment> experimentQuery = Experiment.getQuery(); … … 345 348 /> 346 349 <tbl:columndef 350 id="jobType" 351 property="job.itemSubtype" 352 sortproperty="job.itemSubtype.name" 353 exportproperty="job.itemSubtype.name:string" 354 datatype="int" 355 enumeration="<%=Enumeration.fromItems(jobSubtypesQuery.list(dc), "-none-")%>" 356 title="Job type" 357 sortable="true" 358 filterable="true" 359 exportable="true" 360 /> 361 <tbl:columndef 347 362 id="plugin" 348 363 property="job.pluginDefinition.name" … … 352 367 filterable="true" 353 368 exportable="true" 354 tooltip="The plug-in that was used to import raw data"369 tooltip="The plug-in that was used to create data for the raw bioassay" 355 370 /> 356 371 <tbl:columndef … … 362 377 filterable="true" 363 378 exportable="true" 364 tooltip="The configuration/file format that was used to import raw data"379 tooltip="The configuration/file format that was used to create data for the raw bioassay" 365 380 /> 366 381 <tbl:columndef … … 769 784 enablePropertyLink="<%=mode.hasPropertyLink()%>" 770 785 /></tbl:cell> 786 <tbl:cell column="jobType"><base:propertyvalue 787 item="<%=item%>" 788 property="job.itemSubtype" 789 enableEditLink="<%=mode.hasEditLink()%>" 790 enablePropertyLink="<%=mode.hasPropertyLink()%>" 791 /></tbl:cell> 771 792 <tbl:cell column="plugin"> 772 793 <base:propertyvalue -
branches/3.11-stable/www/views/rawbioassays/view_rawbioassay.jsp
r7166 r7442 53 53 import="net.sf.basedb.core.MultiPermissions" 54 54 import="net.sf.basedb.core.PermissionDeniedException" 55 import="net.sf.basedb.core.ParameterInfo" 56 import="net.sf.basedb.core.BasicItem" 57 import="net.sf.basedb.core.Nameable" 55 58 import="net.sf.basedb.core.PluginDefinition" 59 import="net.sf.basedb.core.PluginConfiguration" 56 60 import="net.sf.basedb.core.plugin.GuiContext" 57 61 import="net.sf.basedb.core.plugin.Plugin" … … 113 117 Job job = null; 114 118 boolean readJob = true; 119 PluginDefinition plugin = null; 120 boolean readPlugin = true; 121 PluginConfiguration configuration = null; 122 boolean readConfiguration = true; 123 115 124 try 116 125 { … … 120 129 { 121 130 readJob = false; 131 readPlugin = false; 132 readConfiguration = false; 122 133 } 134 if (job != null) 135 { 136 try 137 { 138 plugin = job.getPluginDefinition(); 139 } 140 catch (PermissionDeniedException ex) 141 { 142 readPlugin = false; 143 } 144 try 145 { 146 configuration = job.getPluginConfiguration(); 147 } 148 catch (PermissionDeniedException ex) 149 { 150 readConfiguration = false; 151 } 152 } 153 154 123 155 final Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); 124 156 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); … … 317 349 <td style="width: 50%; height: 100%;" class="leftborder"> 318 350 <table class="fullform"> 319 <tbody class="sectionheader">320 <tr>321 <th colspan="4">Raw data import</th>322 </tr>323 </tbody>324 351 <tr> 325 352 <th>Job</th> … … 327 354 </tr> 328 355 <tr> 329 <th>Date / time</th>330 <td colspan="3"><%=job == null ? "" : dateTimeFormatter.format(job.getEnded())%></td>331 </tr>332 <tr>333 356 <th>Plugin</th> 334 <td colspan="3"><base:propertyvalue item="<%=rawBioAssay%>" property="job.pluginDefinition" /></td> 335 </tr> 336 <tr> 337 <th>Configuration / file format</th> 338 <td colspan="3"><base:propertyvalue item="<%=rawBioAssay%>" property="job.pluginConfiguration" /></td> 339 </tr> 340 <tbody class="sectionheader"> 341 <tr> 342 <th colspan="4">Spot images</th> 343 </tr> 344 </tbody> 357 <td colspan="3"> 358 <base:propertyvalue item="<%=rawBioAssay%>" property="job.pluginDefinition" nulltext="<i>External</i>" /> 359 <%=job != null && job.getPluginVersion() != null ? "(" + HTML.encodeTags(job.getPluginVersion()) + ")" : ""%> 360 </td> 361 </tr> 345 362 <% 346 if ( !rawBioAssay.hasSpotImages())363 if (configuration != null) 347 364 { 348 365 %> 349 <tr class="dynamic"> 350 <td colspan="4"> 351 <div class="messagecontainer note"> 352 No spot images has been created for this raw bioassay. 353 </div> 366 <tr> 367 <th>Configuration / file format</th> 368 <td colspan="3"><%=Base.getLinkedName(ID, configuration, !readConfiguration, true)%></td> 369 </tr> 370 <% 371 } 372 if (job != null) 373 { 374 %> 375 <tr> 376 <th>Type</th> 377 <td><base:propertyvalue item="<%=job%>" property="itemSubtype" /></td> 378 </tr> 379 <tr> 380 <th>Started</th> 381 <td> 382 <%=dateTimeFormatter.format(job.getStarted())%> 354 383 </td> 355 384 </tr> 356 <% 385 <tr> 386 <th>Ended</th> 387 <td> 388 <%=dateTimeFormatter.format(job.getEnded())%> 389 </td> 390 </tr> 391 <% 392 if (job.getServer() != null) 393 { 394 %> 395 <tr> 396 <th>Server</th> 397 <td> 398 <%=HTML.encodeTags(job.getServerAndNode())%> 399 </td> 400 </tr> 401 <% 402 } 403 for (String name : job.getParameterNames()) 404 { 405 StringBuilder sb = new StringBuilder(); 406 String displayValue = ""; 407 String description = ""; 408 try 409 { 410 ParameterInfo pi = job.getParameterInfo(name); 411 if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel()); 412 description = HTML.encodeTags(pi.getDescription()); 413 List<?> values = pi.getValuesOrMask(); 414 int i = 0; 415 for (Object value : values) 416 { 417 if (value != null) 418 { 419 if (i > 0) sb.append(", "); 420 i++; 421 if (value instanceof BasicItem) 422 { 423 BasicItem item = (BasicItem)value; 424 String itemName = ""; 425 if (item instanceof File) 426 { 427 itemName = ((File)item).getPath().toString(); 428 } 429 else if (item instanceof Nameable) 430 { 431 itemName = ((Nameable)item).getName(); 432 } 433 else 434 { 435 itemName = item.toString(); 436 } 437 sb.append(Base.getLink(ID, HTML.encodeTags(itemName), 438 item.getType(), item.getId(), item.hasPermission(Permission.WRITE))); 439 } 440 else if (value instanceof Date) 441 { 442 sb.append(dateFormatter.format((Date)value)); 443 } 444 else 445 { 446 sb.append(HTML.encodeTags(value.toString())); 447 } 448 } 449 } 450 displayValue = sb.toString(); 451 } 452 catch (Throwable ex) 453 { 454 displayValue = "<i>ERROR: "+ex.getMessage()+"</i>"; 455 } 456 %> 457 <tr> 458 <th><span title="<%=description%>"><%=name%></span></th> 459 <td> 460 <%=displayValue%> 461 </td> 462 </tr> 463 <% 464 } 357 465 } 358 else466 if (rawBioAssay.hasSpotImages()) 359 467 { 360 468 SpotImages spi = rawBioAssay.getSpotImages(); 361 469 %> 470 <tbody class="sectionheader"> 471 <tr> 472 <th colspan="4">Spot images</th> 473 </tr> 474 </tbody> 362 475 <tr> 363 476 <th>X scale</th> … … 403 516 } 404 517 %> 518 <tr class="dynamic"> 519 <th></th> 520 <td colspan="3"></td> 521 </tr> 405 522 </table> 406 523 </td>
Note: See TracChangeset
for help on using the changeset viewer.