4 <div class="panel panel-default" style="min-height: 10em">
5 <div class="panel-heading"><span class="panel-title">Active pipelines</span>
6 <span class="pull-right">
8 choose_pipeline_templates_path(
9 title: 'Choose a pipeline to run:',
10 action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
11 action_href: pipeline_instances_path,
12 action_method: 'post',
13 action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
14 { class: "btn btn-primary btn-xs", remote: true, method: 'get' }) do %>
15 <i class="fa fa-fw fa-gear"></i> Run a pipeline...
20 <div class="panel-body">
21 <% if running_pipelines.empty? %>
22 No pipelines are currently running.
24 <% running_pipelines.each do |p| %>
25 <div class="dashboard-panel-info-row">
26 <div class="clearfix">
27 <%= link_to_if_arvados_object p, friendly_name: true %>
29 <div class="pull-right" style="width: 40%">
30 <div class="progress" style="margin-bottom: 0px">
35 <% p.components.each do |k, v| %>
36 <% if v.is_a? Hash and v[:job] %>
37 <% if v[:job][:state] == "Running" %>
39 <% elsif v[:job][:state] == "Failed" or v[:job][:state] == "Cancelled" %>
41 <% elsif v[:job][:state] == "Complete" %>
43 <% elsif v[:job][:state] == "Queued" %>
48 <% completed_pct = (completed.size * 100) / p.components.size %>
49 <% failed_pct = (failed.size * 100) / p.components.size %>
50 <% running_pct = (running.size * 100) / p.components.size %>
51 <% queued_pct = (queued.size * 100) / p.components.size %>
53 <div class="progress-bar progress-bar-success" style="width: <%= completed_pct %>%">
54 <span class="sr-only"></span>
56 <div class="progress-bar progress-bar-danger" style="width: <%= failed_pct %>%">
57 <span class="sr-only"></span>
59 <div class="progress-bar progress-bar-primary" style="width: <%= running_pct %>%">
60 <span class="sr-only"></span>
62 <div class="progress-bar progress-bar-default" style="width: <%= queued_pct %>%">
63 <span class="sr-only"></span>
69 <div class="clearfix">
70 Started at <%= render_localized_date(p[:started_at] || p[:created_at], "noseconds") %>.
71 <% pipeline_time = Time.now - (p[:started_at] || p[:created_at]) %>
72 Active for <%= render_runtime(pipeline_time, false) %>.
74 <div class="pull-right">
75 <% running.each do |k| %>
76 <span class="label label-primary"><%= k %></span>
78 <% queued.each do |k| %>
79 <span class="label label-default"><%= k %></span>
88 <div class="panel panel-default">
89 <div class="panel-heading"><span class="panel-title">Recently finished pipelines</span></div>
90 <div class="panel-body">
91 <% finished_pipelines(8).each do |p| %>
92 <div class="dashboard-panel-info-row">
94 <div class="col-md-6 text-overflow-ellipsis">
95 <%= link_to_if_arvados_object p, friendly_name: true %>
97 <div class="col-md-2">
98 <%= render partial: "pipeline_status_label", locals: {p: p}%>
100 <div class="col-md-4">
101 <%= render_localized_date(p[:finished_at] || p[:modified_at], "noseconds") %>
105 <div class="col-md-12">
106 <% if p[:started_at] and p[:finished_at] %>
107 <% pipeline_time = p[:finished_at] - p[:started_at] %>
108 Active for <%= render_runtime(pipeline_time, false) %>
111 <span class="pull-right text-overflow-ellipsis" style="max-width: 100%">
113 <% p.components.each do |k, c| %>
114 <% outputs << c[:output_uuid] if c[:output_uuid] %>
116 <% if outputs.size == 0 %>
118 <% elsif outputs.size == 1 %>
119 <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object outputs[0], friendly_name: true %>
121 <a href="#<%= p[:uuid] %>-outputs" data-toggle="collapse">Outputs <span class="caret"></span></a>
127 <div class="row collapse" id="<%= p[:uuid] %>-outputs" >
128 <div class="col-md-12">
129 <div class="pull-right" style="max-width: 100%">
130 <% outputs.each do |out| %>
131 <div class="text-overflow-ellipsis">
132 <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object out, friendly_name: true %>
144 <div class="col-md-6">
145 <% nodes = Node.all %>
146 <div class="panel panel-default" style="min-height: 10em">
147 <div class="panel-heading"><span class="panel-title">Compute status</span></div>
148 <div class="panel-body">
150 <%= render partial: 'compute_node_summary', locals: {nodes: nodes} %>
151 <div style="text-align: center">
152 <a data-toggle="collapse" href="#compute_node_status">Details <span class="caret"></span></a>
155 <div id="compute_node_status" class="collapse">
156 <%= render partial: 'compute_node_status', locals: {nodes: nodes} %>
160 <div class="panel panel-default">
161 <div class="panel-heading"><span class="panel-title">Recent collections</span></div>
162 <div class="panel-body">
163 <% r = recent_collections(8) %>
164 <% r[:collections].each do |p| %>
165 <div class="dashboard-panel-info-row">
167 <i class="fa fa-fw fa-folder-o"></i><%= link_to_if_arvados_object r[:owners][p[:owner_uuid]], friendly_name: true %>/
168 <span class="pull-right"><%= render_localized_date(p[:modified_at], "noseconds") %></span>
170 <div class="text-overflow-ellipsis" style="margin-left: 1em; width: 100%"><%= link_to_if_arvados_object p, friendly_name: true %>