+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
<% template = PipelineTemplate.find?(@object.pipeline_template_uuid) %>
<%= content_for :content_top do %>
- <h2>
- <%= render_editable_attribute @object, 'name', nil %>
- </h2>
- <% if template %>
- <blockquote><span class="deemphasize">From template:</span><br />
- <%= link_to_if_arvados_object template, friendly_name: true %><br />
- <%= template.description %>
- </blockquote>
- <% end %>
+ <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 %>
+ </div>
+ <% end %>
+ </div>
<% end %>
<% content_for :tab_line_buttons do %>
- <% if @object.state.in? ['Complete', 'Failed', 'Cancelled'] %>
-
- <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
- class: 'btn btn-primary',
- #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
- method: :post,
- ) do %>
- <i class="fa fa-fw fa-play"></i> Re-run with latest
- <% end %>
-
- <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options'),
- "#",
- {class: 'btn btn-primary', 'data-toggle' => "modal",
- 'data-target' => '#clone-and-edit-modal-window'} %>
- <% end %>
+ <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>
- <% if @object.state.in? ['New', 'Ready'] %>
- <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
- class: 'btn btn-primary run-pipeline-button',
- method: :patch
- ) do %>
- <i class="fa fa-fw fa-play"></i> Run
- <% end %>
- <% else %>
- <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
- <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
- class: 'btn btn-primary run-pipeline-button',
- method: :patch
- ) do %>
- <i class="fa fa-fw fa-pause"></i> Pause
- <% end %>
- <% elsif @object.state == 'Paused' %>
- <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
- class: 'btn btn-primary run-pipeline-button',
- method: :patch
- ) do %>
- <i class="fa fa-fw fa-play"></i> Resume
- <% end %>
- <% end %>
- <% end %>
<% end %>
<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>
</div>
<div class="modal-footer">
- <button type="submit" class="btn btn-primary" name="pipeline_instance[state]" value="New">Copy and edit inputs</button>
- <button type="submit" class="btn btn-primary" name="pipeline_instance[state]" value="RunningOnServer">Run now</button>
<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>