Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_tab_buttons.html.erb
1   <% if @object.state.in? ['Complete', 'Failed', 'Cancelled', 'Paused'] %>
2
3   <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
4       class: 'btn btn-primary',
5       title: 'Re-run with latest options',
6       #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
7       method: :post,
8       ) do %>
9     <i class="fa fa-fw fa-play"></i> Re-run with latest
10   <% end %>
11
12   <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options...'),
13       "#",
14       {class: 'btn btn-primary', 'data-toggle' =>  "modal",
15         'data-target' => '#clone-and-edit-modal-window',
16         title: 'Re-run with options'}  %>
17   <% end %>
18
19   <% if @object.state.in? ['New', 'Ready'] %>
20     <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
21         class: 'btn btn-primary run-pipeline-button',
22         title: 'Run this pipeline',
23         method: :patch
24         ) do %>
25       <i class="fa fa-fw fa-play"></i> Run
26     <% end %>
27   <% else %>
28     <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
29       <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
30           class: 'btn btn-primary run-pipeline-button',
31           title: 'Pause this pipeline',
32           method: :patch
33           ) do %>
34         <i class="fa fa-fw fa-pause"></i> Pause
35       <% end %>
36     <% elsif @object.state == 'Paused' %>
37       <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
38           class: 'btn btn-primary run-pipeline-button',
39           title: 'Resume this pipeline',
40           method: :patch
41           ) do %>
42         <i class="fa fa-fw fa-play"></i> Resume
43       <% end %>
44     <% end %>
45   <% end %>