-<% content_for :css do %>
- .pipeline_color_legend {
- padding-left: 1em;
- padding-right: 1em;
- }
-table.pipeline-components-table thead th {
- text-align: bottom;
-}
-table.pipeline-components-table div.progress {
- margin-bottom: 0;
-}
-<% end %>
-<br />
-
-<table class="table pipeline-components-table">
- <colgroup>
- <col width="15%" />
- <col width="15%" />
- <col width="35%" />
- <col width="35%" />
- </colgroup>
- <thead>
- <tr>
- <th>
- component
- </th><th>
- progress
- <%= link_to '(refresh)', request.fullpath, class: 'refresh', remote: true, method: 'get' %>
- </th><th>
- script, version
- </th><th>
- output
- </th>
- </tr>
- </thead>
- <tbody>
- <% render_pipeline_jobs.each do |pj| %>
- <tr>
- <td>
- <% if pj[:job].andand[:uuid] %>
- <%= link_to pj[:name], job_url(id: pj[:job][:uuid]) %>
- <% else %>
- <%= pj[:name] %>
+<% template = PipelineTemplate.find?(@object.pipeline_template_uuid) %>
+<%= content_for :content_top do %>
+ <div class="row">
+ <div class="col-sm-6">
+ <%= render partial: 'name_and_description' %>
+ </div>
+ <% if template %>
+ <div class="alert alert-info col-sm-6">
+ This pipeline was created from the template <%= link_to_if_arvados_object template, friendly_name: true %><br />
+ <% if template.modified_at && (template.modified_at > @object.created_at) %>
+ Note: This template has been modified since this instance was created.
<% end %>
- </td><td>
- <%= pj[:progress_bar] %>
- <% if pj[:job].andand[:cancelled_at] %>
- <span class="pull-right label label-warning">cancelled</span>
- <% elsif pj[:failed] %>
- <span class="pull-right label label-warning">failed</span>
- <% elsif pj[:result] == 'queued' %>
- <span class="pull-right label">queued</span>
- <% end %>
- </td><td>
- <%= pj[:script] %>
- <br /><span class="deemphasize"><%= pj[:script_version] %></span>
- </td><td>
- <%= link_to_if_arvados_object pj[:output] %>
- </td>
- </tr>
+ </div>
<% end %>
- </tbody>
- <tfoot>
- <tr><td colspan="4"></td></tr>
- </tfoot>
-</table>
+ </div>
+<% end %>
+
+<% content_for :tab_line_buttons do %>
-<% if @pipelines.count > 1 %>
- <div style="text-align: center">
- <span class="pipeline_color_legend" style="background: #88ff88">This pipeline</span>
- <span class="pipeline_color_legend" style="background: #8888ff">Comparison pipeline</span>
- <span class="pipeline_color_legend" style="background: #88ffff">Shared by both pipelines</span>
+ <div id="pipeline-instance-tab-buttons"
+ class="pane-loaded arv-log-event-listener arv-refresh-on-state-change"
+ data-pane-content-url="<%= url_for(params.merge(tab_pane: "tab_buttons")) %>"
+ data-object-uuid="<%= @object.uuid %>"
+ >
+ <%= render partial: 'show_tab_buttons', locals: {object: @object}%>
</div>
+
<% end %>
- <%= render partial: 'application/svg_div', locals: {
- divId: "provenance_graph",
- svgId: "provenance_svg",
- svg: @prov_svg } %>
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>
-<div style="height: 1em"></div>
+<div id="clone-and-edit-modal-window" class="modal fade" role="dialog"
+ aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
-<%= render partial: 'arvados_object' %>
+ <%= form_tag copy_pipeline_instance_path do |f| %>
-<% if @object.active %>
-<% content_for :js do %>
-setInterval(function(){$('a.refresh').click()}, 30000);
-<% end %>
-<% end %>
+ <div class="modal-header">
+ <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">×</button>
+ <div>
+ <div class="col-sm-6"> <h4 class="modal-title">Re-run pipeline</h4> </div>
+ </div>
+ <br/>
+ </div>
+
+ <div class="modal-body">
+ <%= radio_button_tag(:script, "use_latest", true) %>
+ <%= label_tag(:script_use_latest, "Use latest script versions") %>
+ <br>
+ <%= radio_button_tag(:script, "use_same") %>
+ <%= label_tag(:script_use_same, "Use same script versions as this run") %>
+ <br>
+ <% if template %>
+ <br>
+ <%= radio_button_tag(:components, "use_latest", true) %>
+ <%= label_tag(:components_use_latest, "Update components against template") %>
+ <br>
+ <%= radio_button_tag(:components, "use_same") %>
+ <%= label_tag(:components_use_same, "Use same components as this run") %>
+ <% end %>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-default" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">Cancel</button>
+ <button type="submit" class="btn btn-primary" name="pipeline_instance[state]" value="RunningOnServer">Run now</button>
+ <button type="submit" class="btn btn-primary" name="pipeline_instance[state]" value="New">Copy and edit inputs</button>
+ </div>
+
+ </div>
+ <% end %>
+ </div>
+</div>