sanger/sequencescape

View on GitHub
app/views/pipelines/_pipeline_limit.html.erb

Summary

Maintainability
Test Coverage

<div id="limit_info">
  <div class="card-body">
    <% batch_limit = @pipeline.item_limit || @pipeline.max_size %>
    <% if batch_limit -%>
      <p>
        This pipelines has a limit of <strong><%= batch_limit %></strong> requests in a batch.  Any requests that would
        take you over this limit will be disabled and appear faded.
      </p>
    <% else -%>
      <p>This pipeline does not have a limit set on the number of requests in a batch.</p>
    <% end -%>

    <%# Custom validation warnings taken from the pipeline's custom validator %>
    <% if @pipeline.validator_class_name&.constantize&.validation_info %>
      <p><%= @pipeline.validator_class_name&.constantize.validation_info %></p>
    <% end %>

    <p>There are <%= requests_waiting %> requests available.</p>
    <p>You have <span id="selection_count">no</span> requests selected.</p>
  </div>
</div>