1 <% template = PipelineTemplate.find(@object.pipeline_template_uuid) rescue nil %>
2 <%= content_for :content_top do %>
4 <%= render_editable_attribute @object, 'name', nil %>
7 <blockquote><span class="deemphasize">From template:</span><br />
8 <%= link_to_if_arvados_object template, friendly_name: true %><br />
9 <%= template.description %>
14 <% content_for :tab_line_buttons do %>
15 <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'pipeline_instance[state]' => 'New'),
16 class: 'btn btn-primary',
17 #data: {toggle: :tooltip, placement: :top}, title: 'copy and modify',
20 Clone and edit <i class="fa fa-fw fa-copy"></i>
24 <% if !@object.state.in? ['New', 'Ready'] %>
26 <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
27 <% content_for :tab_line_buttons do %>
28 <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
29 class: 'btn btn-primary run-pipeline-button',
32 Stop <i class="fa fa-fw fa-stop"></i>
37 <% pipeline_job_uuids = [] %>
39 <div class="pull-right">
40 Current state: <span class="badge badge-info"><%= @object.state.sub('OnServer', '') %></span>
43 <table class="table pipeline-components-table">
45 <col style="width: 15%" />
46 <col style="width: 20%" />
47 <col style="width: 12%" />
48 <col style="width: 12%" />
49 <col style="width: 45%" />
59 <%# format:'js' here helps browsers avoid using the cached js
60 content in html context (e.g., duplicate tab -> see
62 <%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
70 <% render_pipeline_jobs.each do |pj| %>
71 <% if pj[:job].andand[:uuid]
72 pipeline_job_uuids << pj[:job][:uuid]
79 <br /><span class="deemphasize"><%= pj[:script_version] %></span>
81 <%= pj[:progress_bar] %>
82 <% if @object.state == 'Complete' || @object.state == 'Failed' %>
83 <% if pj[:job].andand[:uuid] %>
84 <span class="deemphasize">
85 <%= link_to("..."+pj[:job][:uuid].last(15), job_url(id: pj[:job][:uuid])) %>
88 <% current_job = Job.find(pj[:job][:uuid]) rescue nil %>
89 <% if current_job.andand[:log] %>
90 <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
91 <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
92 <% c.files.each do |file| %>
93 <br/><span class="deemphasize">
94 <a href="<%= collection_path(current_job[:log]) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">log</a>
102 <%= render(partial: 'job_status_label',
103 locals: { :j => pj[:job] }) %>
105 <%= link_to_if_arvados_object pj[:output], {:thumbnail => true} %>
111 <tr><td colspan="5"></td></tr>
115 <% if @object.state.in? %w(RunningOnServer RunningOnClient) %>
117 <% content_for :js do %>
118 setInterval(function(){$('a.refresh').click()}, 15000);
121 <% if !pipeline_job_uuids.empty? %>
122 <h4>Log messages from running jobs</h4>
123 <% log_history = pipeline_log_history(pipeline_job_uuids) %>
124 <div id="pipeline_event_log_history_div">
125 <% log_history.each do |entry| %>
129 <div class="arv-log-event-listener arv-log-event-handler-append-logs" id="pipeline_event_log_div" data-object-uuids="<%=pipeline_job_uuids.join(" ")%>"/>
135 <%# state is either New or Ready %>
137 <% if @object.state.in? %w(New Ready) %>
138 <p><i>Here are all of the pipeline's components (jobs that will need to run in order to complete the pipeline). If you know what you're doing (or you're experimenting) you can modify these parameters before starting the pipeline. Usually, you only need to edit the settings presented on the "Inputs" tab above.</i></p>
141 <% content_for :tab_line_buttons do %>
142 <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
143 class: 'btn btn-primary run-pipeline-button',
146 Run <i class="fa fa-fw fa-play"></i>
150 <% if @object.state.in? ['New', 'Ready'] %>
151 <%= render partial: 'show_components_editable', locals: {editable: true} %>
153 <%= render partial: 'show_components_editable', locals: {editable: false} %>