- <div class="panel-heading"><span class="panel-title">Active pipelines</span>
- <span class="pull-right">
- <%= link_to(
- choose_pipeline_templates_path(
- title: 'Choose a pipeline to run:',
- action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
- 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 %>
- <i class="fa fa-fw fa-gear"></i> Run a pipeline...
- <% end %>
- </span>
- </div>
-
- <% _running_pipelines = running_pipelines %>
- <% _finished_pipelines = finished_pipelines(8) %>
- <% lookup = preload_objects_for_dataclass PipelineTemplate, (_running_pipelines.map(&:pipeline_template_uuid) + _finished_pipelines.map(&:pipeline_template_uuid)) %>
-
- <div class="panel-body">
- <% if _running_pipelines.empty? %>
- No pipelines are currently running.
- <% else %>
- <% _running_pipelines.each do |p| %>
- <div class="dashboard-panel-info-row">
- <div class="clearfix">
- <%= link_to_if_arvados_object p, {friendly_name: true, lookup: lookup} %>
-
- <div class="pull-right" style="width: 40%">
- <div class="progress" style="margin-bottom: 0px">
- <% p.components.each do |k, v| %>
- <% if v.is_a? Hash and v[:job] %>
- <%= render partial: 'job_progress', locals: {:j => v[:job], :scaleby => (1.0/p.components.size)} %>
- <% end %>
- <% end %>
- </div>
- </div>
- </div>
-
- <%
- 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" }
- %>
-
- <div class="clearfix">
- Started at <%= render_localized_date(p[:started_at] || p[:created_at], "noseconds") %>.
- <% pipeline_time = Time.now - (p[:started_at] || p[:created_at]) %>
- Active for <%= render_runtime(pipeline_time, false) %>.
-
- <div class="pull-right">
- <% running.each do |k,v| %>
- <%= render partial: 'job_progress', locals: {:j => v[:job], :show_progress_bar => false, :title => k} %>
+ <div class="panel-heading">
+ <span class="panel-title">Recent pipelines and processes</span>
+ <% if current_user.andand.is_active %>
+ <span class="pull-right recent-processes-actions">
+ <span>
+ <%= link_to(
+ choose_pipeline_templates_path(
+ title: 'Choose a pipeline to run:',
+ action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
+ 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 %>
+ <i class="fa fa-fw fa-gear"></i> Run a pipeline...
+ <% end %>
+ </span>
+ <span>
+ <%= link_to pipeline_instances_path, class: 'btn btn-default btn-xs' do %>
+ All pipelines <i class="fa fa-fw fa-arrow-circle-right"></i>