[ARVADOS] updated: b2c424b286798d187d3260316787cb29d0076a1e

Git user git at public.curoverse.com
Fri Oct 21 09:49:25 EDT 2016


Summary of changes:
 apps/workbench/app/controllers/work_units_controller.rb  | 5 ++++-
 apps/workbench/app/views/work_units/_show_child.html.erb | 3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)

       via  b2c424b286798d187d3260316787cb29d0076a1e (commit)
      from  d2ceffb29e8c3035ddaaf18c606ef73b60ca283a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b2c424b286798d187d3260316787cb29d0076a1e
Author: radhika <radhika at curoverse.com>
Date:   Fri Oct 21 09:48:18 2016 -0400

    10079: jsonifying the main object makes the display take even longer than original problem; the child needs to get it during it's display.

diff --git a/apps/workbench/app/controllers/work_units_controller.rb b/apps/workbench/app/controllers/work_units_controller.rb
index e375689..804d7ce 100644
--- a/apps/workbench/app/controllers/work_units_controller.rb
+++ b/apps/workbench/app/controllers/work_units_controller.rb
@@ -135,7 +135,10 @@ class WorkUnitsController < ApplicationController
       wu = ContainerWorkUnit.new(current_obj, params['name'])
     end
 
-    @object ||= arvados_api_client.unpack_api_response data['main_obj'], data['main_obj_kind']
+    if !@object
+      resource_class = resource_class_for_uuid data['main_obj']
+      @object = object_for_dataclass(resource_class, data['main_obj'])
+    end
 
     respond_to do |f|
       f.html { render(partial: "show_component", locals: {wu: wu}) }
diff --git a/apps/workbench/app/views/work_units/_show_child.html.erb b/apps/workbench/app/views/work_units/_show_child.html.erb
index 3451923..5bd1b46 100644
--- a/apps/workbench/app/views/work_units/_show_child.html.erb
+++ b/apps/workbench/app/views/work_units/_show_child.html.erb
@@ -51,9 +51,8 @@
   </div>
 
   <% name = if current_obj.respond_to?('name') then current_obj.name else '' end %>
-  <% kind = if !@object.is_a?(Hash) then ('arvados#' + @object.class.to_s.camelcase(:lower)) else '' end %>
   <% content_url = url_for(controller: :work_units, action: :show_child_component, name: name) %>
-  <div id="collapse<%=i%>" class="work-unit-component-detail panel-collapse collapse <%= if expanded then 'in' end %>" content-url="<%=content_url%>" action-data="<%={current_obj_type: current_obj.class.to_s, current_obj: current_obj.proxied, main_obj: @object, main_obj_kind: kind}.to_json%>">
+  <div id="collapse<%=i%>" class="work-unit-component-detail panel-collapse collapse <%= if expanded then 'in' end %>" content-url="<%=content_url%>" action-data="<%={current_obj_type: current_obj.class.to_s, current_obj: current_obj.proxied, main_obj: @object.uuid}.to_json%>">
     <div class="panel-body work-unit-component-detail-body">
     </div>
   </div>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list