- <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
- <% content_for :tab_line_buttons do %>
- <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
- class: 'btn btn-primary run-pipeline-button',
- method: :patch
- ) do %>
- Stop <i class="fa fa-fw fa-stop"></i>
- <% end %>
- <% end %>
- <% end %>
-
- <% pipeline_job_uuids = [] %>
-
- <div class="pull-right">
- Current state: <span class="badge badge-info"><%= @object.state.sub('OnServer', '') %></span>
- </div>
-
- <table class="table pipeline-components-table">
- <colgroup>
- <col style="width: 15%" />
- <col style="width: 20%" />
- <col style="width: 12%" />
- <col style="width: 12%" />
- <col style="width: 45%" />
- </colgroup>
- <thead>
- <tr>
- <th>
- component
- </th><th>
- script, version
- </th><th>
- job
- <%# format:'js' here helps browsers avoid using the cached js
- content in html context (e.g., duplicate tab -> see
- javascript) %>
- <%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
- </th><th>
- </th><th>
- output
- </th>
- </tr>
- </thead>
- <tbody>
- <% render_pipeline_jobs.each do |pj| %>
- <% if pj[:job].andand[:uuid]
- pipeline_job_uuids << pj[:job][:uuid]
- end %>
- <tr>
- <td>
- <%= pj[:name] %>
- </td><td>
- <%= pj[:script] %>
- <br /><span class="deemphasize"><%= pj[:script_version] %></span>
- </td><td>
- <%= pj[:progress_bar] %>
- <% if @object.state == 'Complete' || @object.state == 'Failed' %>
- <% if pj[:job].andand[:uuid] %>
- <span class="deemphasize">
- <%= link_to("..."+pj[:job][:uuid].last(15), job_url(id: pj[:job][:uuid])) %>
- </span>
+ <%
+ job_uuids = @object.components.map { |k,j| j.is_a? Hash and j[:job].andand[:uuid] }.compact
+ throttle = 86486400000 # 1001 nights
+ %>
+ <div class="arv-log-refresh-control"
+ data-load-throttle="<%= throttle %>"
+ data-object-uuids="<%= @object.uuid %> <%= job_uuids.join(' ') %>"
+ ></div>