Merge branch 'master' into 10645-cr-display-perf
authorradhika <radhika@curoverse.com>
Thu, 11 May 2017 16:55:26 +0000 (12:55 -0400)
committerradhika <radhika@curoverse.com>
Thu, 11 May 2017 16:55:26 +0000 (12:55 -0400)
apps/workbench/app/models/container_work_unit.rb
apps/workbench/app/views/work_units/_show_status.html.erb

index 84fc1f8f0978e16a86bd34fde8d07a6d2d9cd7c1..afdc91e4dd1fcb55d574b919da597e6cd93fa07b 100644 (file)
@@ -6,7 +6,7 @@ class ContainerWorkUnit < ProxyWorkUnit
     if @proxied.is_a?(ContainerRequest)
       container_uuid = get(:container_uuid)
       if container_uuid
-        @container = Container.where(uuid: container_uuid).first
+        @container = Container.find(container_uuid)
       end
     end
   end
index f2052ef0edead69473db5cfeee18518898089eff..ea6920c1e2be5275bbc119dc3fbd89f875cad1c3 100644 (file)
@@ -1,3 +1,16 @@
+<%
+    container_uuid = if @object.is_a?(Container) then @object.uuid else @object.container_uuid end
+    if container_uuid
+      reqs = ContainerRequest.where(requesting_container_uuid: container_uuid).results
+      child_crs = reqs.map(&:uuid).uniq
+      preload_objects_for_dataclass(ContainerRequest, child_crs)
+
+      child_cs = reqs.map(&:requesting_container_uuid).uniq
+      child_cs += reqs.map(&:container_uuid).uniq
+      preload_objects_for_dataclass(Container, child_cs)
+    end
+%>
+
 <div class="arv-log-refresh-control"
      data-load-throttle="86486400000" <%# 1001 nights %>
      ></div>