3 <% if @object.state == 'Paused' %>
5 This pipeline is paused. Jobs that are
6 already running will continue to run, but no new jobs will be submitted.
11 <% if @object.started_at %>
12 This pipeline started at <span data-utc-date="<%= @object.started_at %>"><%= @object.started_at %></span>.
15 <% if @object.started_at %>
17 <% if @object.state == 'Complete' %>
19 <% elsif @object.state == 'Failed' %>
25 <% walltime = if @object.finished_at then
26 @object.finished_at - @object.started_at
28 Time.now - @object.started_at
31 <%= runtime(walltime, true) %><% if @object.finished_at %> at <span data-utc-date="<%= @object.finished_at %>"><%= @object.finished_at %></span><% end %>.
33 This pipeline is <%= if @object.state.start_with? 'Running' then 'active' else @object.state.downcase end %>.
37 <% if @object.state == 'Failed' %>
38 Check the Log tab for more detail about why this pipeline failed.
43 <% tasks = JobTask.filter([['job_uuid', 'in', render_pipeline_jobs.map { |j| j[:job].andand[:uuid] }]]).results %>
44 <% runningtime = determine_wallclock_runtime(render_pipeline_jobs.map {|j| j[:job]}) %>
46 <% if @object.state.start_with? 'Running' %>
52 <%= render_runtime(runningtime, true, false) %><% cputime = tasks.map { |task|
54 (if task.finished_at then task.finished_at else Time.now() end) - task.started_at
58 }.reduce(:+) %><% if walltime - runningtime > 0 %>
59 (<%= render_runtime(walltime - runningtime, true) %> queued)<% end %><% if cputime == 0 %>.<% else %>
61 <%= render_runtime(cputime, true) %>
62 of CPU time (<%= (cputime/runningtime).round(1) %>⨯ scaling).
68 <% render_pipeline_jobs.each_index do |i| %>
69 <% pj = render_pipeline_jobs[i] %>
70 <% current_job = pj[:job] if pj[:job] != {} %>
71 <div class="panel panel-default">
72 <div class="panel-heading">
73 <div class="container-fluid">
75 <div class="col-md-3">
76 <h4 class="panel-title">
77 <a data-toggle="collapse" href="#collapse<%= i %>">
78 <%= pj[:name] %> <span class="caret"></span>
84 <div class="col-md-1">
85 <%= render(partial: 'job_status_label', locals: { j: current_job }) %>
88 <div class="col-md-3">
89 <% if current_job[:started_at] %>
90 <% walltime = ((if current_job.finished_at then current_job.finished_at else Time.now() end) - current_job.started_at) %>
91 <% cputime = tasks.map { |task|
92 if task.started_at and task.job_uuid == current_job.uuid
93 (if task.finished_at then task.finished_at else Time.now() end) - task.started_at
98 <%= render_runtime(walltime, false, false) %>
99 <% if cputime > 0 %> / <%= render_runtime(cputime, false, false) %> (<%= (cputime/walltime).round(1) %>⨯)<% end %>
103 <% if Job::state(current_job).in? ["Completed", "Failed", "Canceled"] %>
104 <div class="col-md-3">
105 <% if pj[:output_uuid] %>
106 <%= link_to_if_arvados_object pj[:output_uuid], friendly_name: true %>
107 <% elsif current_job.andand[:output] %>
108 <%= link_to_if_arvados_object current_job[:output], link_text: "Output of #{pj[:name]}" %>
113 <% elsif Job::state(current_job) == "Running" %>
114 <div class="col-md-3 pipeline-instance-spacing">
115 <%= pj[:progress_bar] %>
117 <div class="col-md-1 pipeline-instance-spacing">
118 <%= form_tag "/jobs/#{current_job.uuid}/cancel", style: "display:inline; padding-left: 1em" do |f| %>
119 <%= hidden_field_tag :return_to, url_for(@object) %>
120 <%= button_tag "Cancel", {class: 'btn btn-xs btn-danger', id: "cancel-job-button"} %>
123 <% elsif Job::state(current_job) == "Queued" %>
124 <div class="col-md-5">
125 <% queuetime = Time.now - current_job[:created_at] %>
126 Queued for <%= render_runtime(queuetime, true) %>.
128 <% if current_job.queue_position == 0 %>
129 This job is next in the queue to run.
130 <% elsif current_job.queue_position == 1 %>
131 There is 1 job in the queue ahead of this one.
133 There are <%= current_job.queue_position %> jobs in the queue ahead of this one.
140 <div class="col-md-3 col-md-offset-3">
141 <span class="label label-default">Not ready</span>
148 <div id="collapse<%= i %>" class="panel-collapse collapse">
149 <div class="panel-body">
150 <div class="container">
151 <% current_component = (if current_job then current_job else pj end) %>
153 <div class="col-md-6">
155 <% [:script, :repository, :script_version, :supplied_script_version, :nondeterministic].each do |k| %>
157 <td style="padding-right: 1em">
161 <% if current_component[k].nil? %>
164 <%= current_component[k] %>
169 <% if current_component[:runtime_constraints].andand[:docker_image] and current_component[:docker_image_locator] %>
171 <td style="padding-right: 1em">
175 <%= current_component[:runtime_constraints][:docker_image] %>
179 <td style="padding-right: 1em">
180 docker_image_locator:
183 <%= link_to_if_arvados_object current_component[:docker_image_locator], friendly_name: true %>
188 <td style="padding-right: 1em">
198 <div class="col-md-5">
200 <% [:uuid, :modified_by_user_uuid, :priority, :created_at, :started_at, :finished_at].each do |k| %>
202 <td style="padding-right: 1em">
207 <%= link_to_if_arvados_object current_component[k], link_text: current_component[k] %>
208 <% elsif k.to_s.end_with? 'uuid' %>
209 <%= link_to_if_arvados_object current_component[k], friendly_name: true %>
210 <% elsif k.to_s.end_with? '_at' %>
211 <span data-utc-date="<%= current_component[k] %>"><%= current_component[k] %></span>
213 <%= current_component[k] %>
222 <div class="col-md-6">
223 <p>script_parameters:</p>
224 <pre><%= JSON.pretty_generate(current_component[:script_parameters]) rescue nil %></pre>
226 <% if current_component[:tasks_summary] %>
227 <div class="col-md-3">
229 <% [:done, :running, :failed, :todo].each do |d| %>
231 <td style="padding-right: 1em"><%= 'tasks:' if d == :done %></td>
232 <td style="padding-right: 1em"><%= d.to_s %></td>
233 <td><%= current_component[:tasks_summary][d] %></td>