1 <% content_for :css do %>
5 <% template = PipelineTemplate.find(@object.pipeline_template_uuid) rescue nil %>
7 <%= content_for :content_top do %>
9 <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => 'Unnamed pipeline' } %>
14 <%= link_to_if_arvados_object template, friendly_name: true %>
19 <% pipeline_job_uuids = [] %>
21 <% if !@object.state.in? ['New', 'Ready', 'Paused'] %>
22 <table class="table pipeline-components-table">
24 <col style="width: 15%" />
25 <col style="width: 20%" />
26 <col style="width: 12%" />
27 <col style="width: 12%" />
28 <col style="width: 45%" />
38 <%# format:'js' here helps browsers avoid using the cached js
39 content in html context (e.g., duplicate tab -> see
41 <%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
49 <% render_pipeline_jobs.each do |pj| %>
50 <% if pj[:job].andand[:uuid]
51 pipeline_job_uuids << pj[:job][:uuid]
58 <br /><span class="deemphasize"><%= pj[:script_version] %></span>
60 <%= pj[:progress_bar] %>
61 <% if @object.state == 'Complete' || @object.state == 'Failed' %>
62 <% if pj[:job].andand[:uuid] %>
63 <span class="deemphasize">
64 <%= link_to("..."+pj[:job][:uuid].last(15), job_url(id: pj[:job][:uuid])) %>
67 <% current_job = Job.find(pj[:job][:uuid]) rescue nil %>
68 <% if current_job.andand[:log] %>
69 <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
70 <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
71 <% c.files.each do |file| %>
72 <br/><span class="deemphasize">
73 <a href="<%= collection_path(current_job[:log]) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">log</a>
81 <%= render(partial: 'job_status_label',
82 locals: { :j => pj[:job] }) %>
84 <%= link_to_if_arvados_object pj[:output], {:thumbnail => true} %>
90 <tr><td colspan="5"></td></tr>
94 <% if @object.state == 'RunningOnServer' || @object.state == 'RunningOnClient' %>
95 <% content_for :js do %>
96 setInterval(function(){$('a.refresh').click()}, 15000);
99 <% content_for :tab_line_buttons do %>
100 <%= form_tag @object, :method => :put do |f| %>
102 <%= hidden_field @object.class.to_s.underscore.singularize.to_sym, :state, :value => 'Paused' %>
104 <%= button_tag({class: 'btn btn-primary pull-right run-pipeline-button'}) do %>
105 Stop <i class="fa fa-fw fa-stop"></i>
110 <% if !pipeline_job_uuids.empty? %>
111 <h4>Log messages from running jobs</h4>
112 <% log_history = pipeline_log_history(pipeline_job_uuids) %>
113 <div id="pipeline_event_log_history_div">
114 <% log_history.each do |entry| %>
118 <div class="arv-log-event-listener arv-log-event-handler-append-logs" id="pipeline_event_log_div" data-object-uuids="<%=pipeline_job_uuids.join(" ")%>"/>
122 <% else %> <%# State new or ready or paused %>
123 <% if @object.state == 'New' %>
124 <p>Please set the desired input parameters for the components of this pipeline. Parameters highlighted in red are required.</p>
127 <% content_for :tab_line_buttons do %>
128 <%= form_tag @object, :method => :put do |f| %>
130 <%= hidden_field @object.class.to_s.underscore.singularize.to_sym, :state, :value => 'RunningOnServer' %>
132 <%= button_tag({class: 'btn btn-primary pull-right run-pipeline-button'}) do %>
133 Run <i class="fa fa-fw fa-play"></i>
138 <% if @object.state.in? ['New', 'Ready'] %>
139 <%= render partial: 'show_components_editable', locals: {editable: true} %>
141 <%= render partial: 'show_components_editable', locals: {editable: false} %>