+ <% _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)) %>
+
- <% if running_pipelines.empty? %>
+ <% if _running_pipelines.empty? %>
No pipelines are currently running.
- <% end %>
- <% running_pipelines.each do |p| %>
+ <% else %>
+ <% _running_pipelines.each do |p| %>
- <%= link_to_if_arvados_object p, friendly_name: true %>
+ <%= link_to_if_arvados_object p, {friendly_name: true, lookup: lookup} %>
- <% running = [] %>
- <% failed = [] %>
- <% completed = [] %>
- <% queued = [] %>
<% p.components.each do |k, v| %>
- <% if v[:job] %>
- <% if Job::state(v[:job]) == "Running" %>
- <% running << k %>
- <% elsif Job::state(v[:job]) == "Failed" or Job::state(v[:job]) == "Canceled" %>
- <% failed << k %>
- <% elsif Job::state(v[:job]) == "Completed" %>
- <% completed << k %>
- <% elsif Job::state(v[:job]) == "Queued" %>
- <% queued << k %>
- <% end %>
+ <% if v.is_a? Hash and v[:job] %>
+ <%= render partial: 'job_progress', locals: {:j => v[:job], :scaleby => (1.0/p.components.size)} %>
<% end %>
<% end %>
- <% completed_pct = (completed.size * 100) / p.components.size %>
- <% failed_pct = (failed.size * 100) / p.components.size %>
- <% running_pct = (running.size * 100) / p.components.size %>
- <% queued_pct = (queued.size * 100) / p.components.size %>
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <%
+ 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" }
+ %>
+
- Started at
<%= p[:created_at] %>.
+ Started at <%= render_localized_date(p[:started_at] || p[:created_at], "noseconds") %>.
<% pipeline_time = Time.now - (p[:started_at] || p[:created_at]) %>
- Active for <%= runtime(pipeline_time, false) %>.
+ Active for <%= render_runtime(pipeline_time, false) %>.
- <% running.each do |k| %>
- <%= k %>
+ <% running.each do |k,v| %>
+ <%= render partial: 'job_progress', locals: {:j => v[:job], :show_progress_bar => false, :title => k} %>
<% end %>
- <% queued.each do |k| %>
- <%= k %>
+ <% queued.each do |k,v| %>
+ <%= render partial: 'job_progress', locals: {:j => v[:job], :show_progress_bar => false, :title => k} %>
<% end %>
<% end %>
+ <% end %>