1 <% if current_user.andand.is_active %>
2 <% if @object.state.in? ['Complete', 'Failed', 'Cancelled', 'Paused'] %>
4 <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
5 class: 'btn btn-primary',
6 title: 'Re-run with latest options',
7 #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
10 <i class="fa fa-fw fa-play"></i> Re-run with latest
13 <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options...'),
15 {class: 'btn btn-primary', 'data-toggle' => "modal",
16 'data-target' => '#clone-and-edit-modal-window',
17 title: 'Re-run with options'} %>
20 <% if @object.state.in? ['New', 'Ready'] %>
21 <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
22 class: 'btn btn-primary run-pipeline-button',
23 title: 'Run this pipeline',
26 <i class="fa fa-fw fa-play"></i> Run
29 <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
30 <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
31 class: 'btn btn-primary run-pipeline-button',
32 title: 'Pause this pipeline',
35 <i class="fa fa-fw fa-pause"></i> Pause
37 <% elsif @object.state == 'Paused' %>
38 <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
39 class: 'btn btn-primary run-pipeline-button',
40 title: 'Resume this pipeline',
43 <i class="fa fa-fw fa-play"></i> Resume