X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e6cd7c31ee28851d3ead992437fc93f2fc73ef92..b5d352d6099b60db5dcdd9183dcab3e8e17d729e:/apps/workbench/app/views/work_units/_show_status.html.erb diff --git a/apps/workbench/app/views/work_units/_show_status.html.erb b/apps/workbench/app/views/work_units/_show_status.html.erb index 4b629c8783..b80d50dba2 100644 --- a/apps/workbench/app/views/work_units/_show_status.html.erb +++ b/apps/workbench/app/views/work_units/_show_status.html.erb @@ -1,6 +1,23 @@ +<% + 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) + 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 +%> +
>
<%= - render(partial: 'work_units/show_component', locals: {wu: current_obj.work_unit(name)}) + render(partial: 'work_units/show_component', locals: {wu: wu}) %>