end
end
+ def find_object_by_uuid
+ if params['object_type']
+ @object = params['object_type'].constantize.find(params['uuid'])
+ else
+ super
+ end
+ end
+
def show_child_component
data = JSON.load(params[:action_data])
current_obj = data['current_obj']
current_obj_type = data['current_obj_type']
+ current_obj_name = data['current_obj_name']
if current_obj['uuid']
resource_class = resource_class_for_uuid current_obj['uuid']
obj = object_for_dataclass(resource_class, current_obj['uuid'])
current_obj = obj if obj
end
+
if current_obj_type == JobWorkUnit.to_s
- wu = JobWorkUnit.new(current_obj, params['name'])
+ wu = JobWorkUnit.new(current_obj, current_obj_name)
elsif current_obj_type == PipelineInstanceWorkUnit.to_s
- wu = PipelineInstanceWorkUnit.new(current_obj, params['name'])
+ wu = PipelineInstanceWorkUnit.new(current_obj, current_obj_name)
elsif current_obj_type == ContainerWorkUnit.to_s
- wu = ContainerWorkUnit.new(current_obj, params['name'])
- end
-
- if !@object
- resource_class = resource_class_for_uuid data['main_obj']
- @object = object_for_dataclass(resource_class, data['main_obj'])
+ wu = ContainerWorkUnit.new(current_obj, current_obj_name)
end
respond_to do |f|
<%
job_uuids = @object.components.map { |k,j| j.is_a? Hash and j[:job].andand[:uuid] }.compact
- throttle = @object.state.start_with?('Running') ? 5000 : 15000
+ throttle = 86486400000 # 1001 nights
%>
<div class="arv-log-refresh-control"
data-load-throttle="<%= throttle %>"
</div>
</div>
- <% name = if current_obj.respond_to?('name') then current_obj.name 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.uuid}.to_json%>">
+ <% content_url = url_for(controller: :work_units, action: :show_child_component, id: @object.uuid, object_type: @object.class.to_s) %>
+ <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_name: current_obj.label, current_obj: current_obj.proxied}.to_json%>">
<div class="panel-body work-unit-component-detail-body">
</div>
</div>
<div class="arv-log-refresh-control"
- data-load-throttle="15000"
+ data-load-throttle="86486400000" <%# 1001 nights %>
></div>
<%=
render(partial: 'work_units/show_component', locals: {wu: current_obj.work_unit(name)})
get "star" => 'actions#star', :as => :star
get "all_processes" => 'work_units#index', :as => :all_processes
get "choose_work_unit_templates" => 'work_unit_templates#choose', :as => :choose_work_unit_templates
- resources :work_units
- post "show_child_component" => 'work_units#show_child_component'
+ resources :work_units do
+ post 'show_child_component', :on => :member
+ end
resources :nodes
resources :humans
resources :traits