1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <% if current_user.andand.is_active %>
6 <% if @object.state.in? ['Complete', 'Failed', 'Cancelled', 'Paused'] %>
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',
14 <i class="fa fa-fw fa-play"></i> Re-run with latest
17 <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options...'),
19 {class: 'btn btn-primary', 'data-toggle' => "modal",
20 'data-target' => '#clone-and-edit-modal-window',
21 title: 'Re-run with options'} %>
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',
30 <i class="fa fa-fw fa-play"></i> Run
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?'},
40 <i class="fa fa-fw fa-pause"></i> Pause
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',
48 <i class="fa fa-fw fa-play"></i> Resume