end
# helper method to get collections for the given uuid
- helper_method :get_collections
- def get_collections uuid
- preload_collections([uuid])
+ helper_method :collections_for_object
+ def collections_for_object uuid
+ preload_collections_for_objects([uuid])
@all_collections_for[uuid]
end
# helper method to preload collections for the given uuids
- helper_method :preload_collections
- def preload_collections uuids
+ helper_method :preload_collections_for_objects
+ def preload_collections_for_objects uuids
@all_collections_for ||= {}
if not uuids.select { |x| @all_collections_for[x].nil? }.any?
# already preloaded for all of these uuids
end
# helper method to get log collections for the given log
- helper_method :get_log_collections
- def get_log_collections log
+ helper_method :log_collections_for_object
+ def log_collections_for_object log
fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(log)
uuid = fixup[1]
- preload_log_collections([uuid])
+ preload_log_collections_for_objects([uuid])
@all_log_collections_for[uuid]
end
# helper method to preload collections for the given uuids
- helper_method :preload_log_collections
- def preload_log_collections logs
+ helper_method :preload_log_collections_for_objects
+ def preload_log_collections_for_objects logs
uuids = []
logs.each do |log|
fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(log)
job_logs << j.log
end
- preload_collections job_outputs
- preload_log_collections job_logs
+ preload_collections_for_objects job_outputs
+ preload_log_collections_for_objects job_logs
%>
<% @my_jobs[0..6].each do |j| %>
<tr data-object-uuid="<%= j.uuid %>">
<small>
<% if j.success and j.output %>
<a href="<%= collection_path(j.output) %>">
- <% collections = get_collections(j.output) %>
+ <% collections = collections_for_object(j.output) %>
<% if collections && !collections.empty? %>
<% c = collections.first %>
<% c.files.each do |file| %>
<td>
<small>
<% if j.log %>
- <% log_collections = get_log_collections(j.log) %>
+ <% log_collections = log_collections_for_object(j.log) %>
<% if log_collections && !log_collections.empty? %>
<% c = log_collections.first %>
<% c.files.each do |file| %>