Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_tab_buttons.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% if current_user.andand.is_active %>
6   <% if @object.state.in? ['Complete', 'Failed', 'Cancelled', 'Paused'] %>
7
8   <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
9       class: 'btn btn-primary',
10       title: 'Re-run with latest options',
11       #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
12       method: :post,
13       ) do %>
14     <i class="fa fa-fw fa-play"></i> Re-run with latest
15   <% end %>
16
17   <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options...'),
18       "#",
19       {class: 'btn btn-primary', 'data-toggle' =>  "modal",
20         'data-target' => '#clone-and-edit-modal-window',
21         title: 'Re-run with options'}  %>
22   <% end %>
23
24   <% if @object.state.in? ['New', 'Ready'] %>
25     <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
26         class: 'btn btn-primary run-pipeline-button',
27         title: 'Run this pipeline',
28         method: :patch
29         ) do %>
30       <i class="fa fa-fw fa-play"></i> Run
31     <% end %>
32   <% else %>
33     <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
34       <%= link_to(cancel_pipeline_instance_path,
35           class: 'btn btn-primary run-pipeline-button',
36           title: 'Pause this pipeline',
37           data: {confirm: 'All unfinished child jobs will be canceled, even if they are being used in another job or pipeline. Are you sure you want to pause this pipeline?'},
38           method: :post
39           ) do %>
40         <i class="fa fa-fw fa-pause"></i> Pause
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           title: 'Resume this pipeline',
46           method: :patch
47           ) do %>
48         <i class="fa fa-fw fa-play"></i> Resume
49       <% end %>
50     <% end %>
51   <% end %>
52 <% end %>