2875: minor text update
[arvados.git] / apps / workbench / app / views / pipeline_instances / show.html.erb
1 <% template = PipelineTemplate.find?(@object.pipeline_template_uuid) %>
2 <%= content_for :content_top do %>
3   <div class="row">
4     <div class="col-sm-6">
5       <%= render partial: 'name_and_description' %>
6     </div>
7     <% if template %>
8       <div class="alert alert-info col-sm-6">
9         This pipeline was created from the template <%= link_to_if_arvados_object template, friendly_name: true %><br />
10         <% if template.modified_at && (template.modified_at > @object.created_at) %>
11         Note: This template has been modified since this instance was created.
12         <% end %>
13       </div>
14     <% end %>
15   </div>
16 <% end %>
17
18 <% content_for :tab_line_buttons do %>
19   <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'pipeline_instance[state]' => 'New'),
20       class: 'btn btn-primary',
21       #data: {toggle: :tooltip, placement: :top}, title: 'copy and modify',
22       method: :post,
23       ) do %>
24     Clone and edit <i class="fa fa-fw fa-copy"></i>
25   <% end %>
26
27   <% if @object.state.in? ['New', 'Ready'] %>
28     <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
29         class: 'btn btn-primary run-pipeline-button',
30         method: :patch
31         ) do %>
32       Run <i class="fa fa-fw fa-play"></i>
33     <% end %>
34   <% else %>
35     <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
36       <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
37           class: 'btn btn-primary run-pipeline-button',
38           method: :patch
39           ) do %>
40         Stop <i class="fa fa-fw fa-stop"></i>
41       <% end %>
42     <% elsif @object.state == 'Paused' %>
43       <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
44           class: 'btn btn-primary run-pipeline-button',
45           method: :patch
46           ) do %>
47         Resume <i class="fa fa-fw fa-play"></i>
48       <% end %>
49     <% end %>
50   <% end %>
51 <% end %>
52
53 <%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>