1 <div class="panel panel-default">
2 <div class="panel-heading">
3 <div class="container-fluid">
4 <div class="row-fluid">
6 <div class="col-md-2" style="word-break:break-all;">
7 <h4 class="panel-title">
8 <a data-toggle="collapse" href="#collapse<%= i %>">
9 <%= current_obj.label %> <span class="caret"></span>
14 <%# column offset 2 %>
15 <div class="col-md-2 pipeline-instance-spacing">
16 <%= render partial: 'work_unit/progress', locals: {wu: current_obj} %>
19 <%# column offset 4 %>
20 <% if not current_obj %>
21 <div class="col-md-8"></div>
23 <div class="col-md-1">
24 <% if current_obj.state_label.in? ["Complete", "Failed", "Cancelled"] %>
25 <% if current_obj.log_collection %>
26 <% logCollection = Collection.find? current_obj.log_collection %>
27 <% if logCollection %>
28 <%= link_to "Log", job_path(current_obj.uuid, anchor: "Log") %>
33 <% elsif current_obj.state_label == "Running" %>
34 <% job = Job.find? current_obj.uuid %>
36 <%= link_to "Log", job_path(current_obj.uuid, anchor: "Log") %>
43 <%# column offset 5 %>
44 <% if current_obj.state_label != "Queued" %>
45 <div class="col-md-3">
46 <% if current_obj.started_at %>
47 <% walltime = ((if current_obj.finished_at then current_obj.finished_at else Time.now() end) - current_obj.started_at) %>
48 <% cputime = (current_obj.runtime_constraints.andand[:min_nodes] || 1) *
49 ((current_obj.finished_at || Time.now()) - current_obj.started_at) %>
50 <%= render_runtime(walltime, false) %>
51 <% if cputime > 0 %> / <%= render_runtime(cputime, false) %> (<%= (cputime/walltime).round(1) %>⨯)<% end %>
56 <% if current_obj.state_label == "Queued" %>
57 <%# column offset 5 %>
58 <div class="col-md-6">
59 <% queuetime = Time.now - Time.parse(current_obj.created_at.to_s) %>
60 Queued for <%= render_runtime(queuetime, false) %>.
62 <% elsif current_obj.state_label == "Running" %>
63 <% if current_obj.child_summary %>
64 <%# column offset 8 %>
65 <div class="col-md-3">
66 <span class="task-summary-status">
67 <%= current_obj.child_summary[:done] %> <%= "task".pluralize(current_obj.child_summary[:done]) %> done,
68 <%= current_obj.child_summary[:failed] %> failed,
69 <%= current_obj.child_summary[:running] %> running,
70 <%= current_obj.child_summary[:todo] %> pending
74 <% elsif current_obj.state_label.in? ["Complete", "Failed", "Cancelled"] %>
75 <%# column offset 8 %>
76 <div class="col-md-4 text-overflow-ellipsis">
77 <% if current_obj.output %>
78 <%= link_to_arvados_object_if_readable(current_obj.output, 'Output data not available', friendly_name: true) %>
79 <% elsif current_obj.output %>
80 <%= link_to_arvados_object_if_readable(current_obj.output, 'Output data not available', link_text: "Output of #{current_obj.label}") %>
87 <% if current_obj.state_label.in? ["Queued", "Running"] and @object.work_unit.can_cancel? and @object.editable? %>
88 <%# column offset 11 %>
89 <div class="col-md-1 pipeline-instance-spacing">
90 <%= form_tag "#{current_obj.uri}/cancel", remote: true, style: "display:inline; padding-left: 1em" do |f| %>
91 <%= hidden_field_tag :return_to, url_for(@object) %>
92 <%= button_tag "Cancel", {class: 'btn btn-xs btn-danger', id: "cancel-job-button"} %>
101 <div id="collapse<%= i %>" class="panel-collapse collapse <%= if expanded then 'in' end %>">
102 <div class="panel-body">
103 <%= render partial: 'work_unit/show_component', locals: {wu: current_obj} %>