20259: Add documentation for banner and tooltip features
[arvados.git] / apps / workbench / app / views / work_units / _show_status.html.erb
index f2052ef0edead69473db5cfeee18518898089eff..003948584afae697bfef7822fdb60c65e5335674 100644 (file)
@@ -1,6 +1,27 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
+<%
+    container_uuid = if @object.is_a?(Container) then @object.uuid elsif @object.is_a?(ContainerRequest) then @object.container_uuid end
+    if container_uuid
+      cols = ContainerRequest.columns.map(&:name) - %w(id updated_at mounts runtime_token)
+      reqs = ContainerRequest.select(cols).where(requesting_container_uuid: container_uuid).results
+      load_preloaded_objects(reqs)
+
+      child_cs = reqs.map(&:requesting_container_uuid).uniq
+      child_cs += reqs.map(&:container_uuid).uniq
+      preload_objects_for_dataclass(Container, child_cs)
+
+      wu = current_obj.work_unit(name, child_objects=reqs)
+    else
+      wu = current_obj.work_unit(name)
+    end
+%>
+
 <div class="arv-log-refresh-control"
      data-load-throttle="86486400000" <%# 1001 nights %>
      ></div>
 <%=
-   render(partial: 'work_units/show_component', locals: {wu: current_obj.work_unit(name)})
+   render(partial: 'work_units/show_component', locals: {wu: wu})
 %>