/templates/webapps/reports/dataset_info.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 125 lines · 122 code · 3 blank · 0 comment · 2 complexity · c0be6aa2f729cc09ad176b6df7792ac3 MD5 · raw file

  1. <%inherit file="/base.mako"/>
  2. <%namespace file="/message.mako" import="render_msg" />
  3. <%
  4. from galaxy.web.framework.helpers import time_ago
  5. from galaxy.webapps.galaxy.controllers.library_common import get_containing_library_from_library_dataset
  6. %>
  7. %if message:
  8. ${render_msg( message, 'done' )}
  9. %endif
  10. <div class="toolForm">
  11. <h3 align="center">Dataset Information</h3>
  12. <div class="toolFormBody">
  13. <div class="form-row">
  14. <label>Date uploaded:</label>
  15. ${time_ago( dataset.create_time )}
  16. <div style="clear: both"></div>
  17. </div>
  18. <div class="form-row">
  19. <label>Last updated:</label>
  20. ${time_ago( dataset.update_time )}
  21. <div style="clear: both"></div>
  22. </div>
  23. <div class="form-row">
  24. <label>File size:</label>
  25. ${dataset.get_size( nice_size=True )}
  26. <div style="clear: both"></div>
  27. </div>
  28. <div class="form-row">
  29. <label>State:</label>
  30. ${dataset.state}
  31. <div style="clear: both"></div>
  32. </div>
  33. </div>
  34. </div>
  35. %if associated_hdas:
  36. <p/>
  37. <b>Active (undeleted) history items that use this library dataset's disk file</b>
  38. <div class="toolForm">
  39. <table class="grid">
  40. <thead>
  41. <tr>
  42. <th>History</th>
  43. <th>History Item</th>
  44. <th>Last Updated</th>
  45. <th>User</th>
  46. </tr>
  47. </thead>
  48. %for hda in associated_hdas:
  49. <tr>
  50. <td>
  51. %if hda.history:
  52. ${hda.history.get_display_name()}
  53. %else:
  54. no history
  55. %endif
  56. </td>
  57. <td>${hda.get_display_name()}</td>
  58. <td>${time_ago( hda.update_time )}</td>
  59. <td>
  60. %if hda.history and hda.history.user:
  61. ${hda.history.user.email}
  62. %else:
  63. anonymous
  64. %endif
  65. </td>
  66. </tr>
  67. %endfor
  68. </table>
  69. </div>
  70. <p/>
  71. %endif
  72. %if associated_lddas:
  73. <p/>
  74. <b>Other active (undeleted) library datasets that use this library dataset's disk file</b>
  75. <div class="toolForm">
  76. <table class="grid">
  77. <thead>
  78. <tr>
  79. <th>Library</th>
  80. <th>Folder</th>
  81. <th>Library Dataset</th>
  82. <th>Last Updated</th>
  83. <th>Uploaded By</th>
  84. </tr>
  85. </thead>
  86. %for ldda in associated_lddas:
  87. <% containing_library = get_containing_library_from_library_dataset( trans, ldda.library_dataset ) %>
  88. <tr>
  89. <td>
  90. <%
  91. if containing_library:
  92. library_display_name = containing_library.get_display_name()
  93. else:
  94. library_display_name = 'no library'
  95. %>
  96. ${library_display_name}
  97. </td>
  98. <td>
  99. <%
  100. library_dataset = ldda.library_dataset
  101. folder = library_dataset.folder
  102. folder_display_name = folder.get_display_name()
  103. if folder_display_name == library_display_name:
  104. folder_display_name = 'library root'
  105. %>
  106. ${folder_display_name}
  107. </td>
  108. <td>${ldda.get_display_name()}</td>
  109. <td>${time_ago( ldda.update_time )}</td>
  110. <td>
  111. %if ldda.user:
  112. ${ldda.user.email}
  113. %else:
  114. anonymous
  115. %endif
  116. </td>
  117. </tr>
  118. %endfor
  119. </table>
  120. </div>
  121. <p/>
  122. %endif