X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2c7b72059f8390d56f7031206772dc3d4e4ad5da..e01762a0adcdee209f305cfc2ae902ab4eb94899:/apps/workbench/app/views/projects/_show_dashboard.html.erb diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb index e384e421f5..437f05a499 100644 --- a/apps/workbench/app/views/projects/_show_dashboard.html.erb +++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb @@ -3,18 +3,20 @@
Active pipelines + <% if current_user.andand.is_active %> - <%= link_to( - choose_pipeline_templates_path( - title: 'Choose a pipeline to run:', - action_name: 'Next: choose inputs ', - action_href: pipeline_instances_path, - action_method: 'post', - action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json), - { class: "btn btn-primary btn-xs", remote: true, method: 'get' }) do %> - Run a pipeline... - <% end %> - + <%= link_to( + choose_pipeline_templates_path( + title: 'Choose a pipeline to run:', + action_name: 'Next: choose inputs ', + action_href: pipeline_instances_path, + action_method: 'post', + action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json), + { class: "btn btn-primary btn-xs", remote: true }) do %> + Run a pipeline... + <% end %> + + <% end %>
<% _running_pipelines = running_pipelines %> @@ -33,15 +35,17 @@
<% p.components.each do |k, v| %> - <%= render partial: 'job_progress', locals: {:j => v[:job], :scaleby => (1.0/p.components.size)} %> + <% if v.is_a? Hash and v[:job] %> + <%= render partial: 'job_progress', locals: {:j => v[:job], :scaleby => (1.0/p.components.size)} %> + <% end %> <% end %>
<% - running = p.components.select { |k, c| c.andand[:job].andand[:state] == "Running" } - queued = p.components.select { |k, c| c.andand[:job].andand[:state] == "Queued" } + running = p.components.select { |k, c| c.is_a? Hash and c[:job].andand[:state] == "Running" } + queued = p.components.select { |k, c| c.is_a? Hash and c[:job].andand[:state] == "Queued" } %>