Hack to fix job log links (because crunch still produces identifiers with +K@qr1hi)
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 12 Feb 2014 14:30:17 +0000 (09:30 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 12 Feb 2014 14:30:17 +0000 (09:30 -0500)
apps/workbench/app/views/users/_tables.html.erb

index 8d5b84f6ebe40f624cd3d0abe12f461172654938..2920bcaac02f0243ded218d888974807747d4e9a 100644 (file)
@@ -50,7 +50,8 @@
 <td>
   <small>
     <% if j.log %>
-      <% Collection.limit(1).where(uuid: j.log).each do |c| %>
+      <% fixup = /([a-f0-9]{32}\+\d+)(\+.*)/.match(j.log)%>
+      <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
         <% c.files.each do |file| %>
           <a href="<%= collection_path(j.log) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">Log</a>
         <% end %>