X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1e2e0e4f14a730ba1bbea6a4ced5d87ea2766c35..d68cb1845e82f44ecf126ae4fd1ba3abc00f4463:/apps/workbench/app/views/projects/_show_dashboard.html.erb diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb index 437f05a499..873d4f3f70 100644 --- a/apps/workbench/app/views/projects/_show_dashboard.html.erb +++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb @@ -1,157 +1,169 @@ +<% + recent_procs = recent_processes(12) + + wus = {} + outputs = [] + recent_procs.each do |p| + wu = p.work_unit + wus[p] = wu + outputs << wu.outputs + end + outputs = outputs.flatten.uniq + + collection_pdhs = outputs.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact + collection_uuids = outputs - collection_pdhs + + if Rails.configuration.show_recent_collections_in_dashboard + recent_cs = recent_collections(8) + collection_uuids = collection_uuids + recent_cs[:collections].collect {|c| c.uuid} + collection_uuids.flatten.uniq + end + + preload_collections_for_objects collection_uuids if collection_uuids.any? + preload_for_pdhs collection_pdhs if collection_pdhs.any? + preload_links_for_objects(collection_pdhs + collection_uuids) +%>