Sha256: d5deb279ada089d518154e721819db6be8457b6ce7190ca74c9dadb62f2db752

Contents?: true

Size: 1.9 KB

Versions: 13

Compression:

Stored size: 1.9 KB

Contents

<div class="card my-3 p-6">
  <%= render 'shared/chart', chart_data: @chart %>
</div>

<div class='card mb-2'>
  <div class='card-body d-flex flex-wrap'>
    <div class='mr-4'>
      <small>Filter by job class</small>
      <br>
      <% @filter.job_classes.each do |name, count| %>
        <% if params[:job_class] == name %>
          <%= link_to(root_path(@filter.to_params(job_class: nil)), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true)  do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% else %>
          <%= link_to(root_path(@filter.to_params(job_class: name)), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% end %>
      <% end %>
    </div>
    <div>
      <small>Filter by state</small>
      <br>
      <% @filter.states.each do |name, count| %>
        <% if params[:state] == name %>
          <%= link_to(root_path(@filter.to_params(state: nil)), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true)  do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% else %>
          <%= link_to(root_path(@filter.to_params(state: name)), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% end %>
      <% end %>
    </div>
  </div>
</div>

<% if @filter.jobs.present? %>
  <%= render 'shared/jobs_table', jobs: @filter.jobs %>

  <nav aria-label="Job pagination" class="mt-3">
    <ul class="pagination">
      <li class="page-item">
        <%= link_to({ after_scheduled_at: (@filter.last.scheduled_at || @filter.last.created_at), after_id: @filter.last.id }, class: "page-link") do %>
          Next jobs <span aria-hidden="true">&raquo;</span>
        <% end %>
      </li>
    </ul>
  </nav>
<% else %>
  <em>No jobs present.</em>
<% end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
good_job-1.9.4 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.9.3 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.9.2 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.9.1 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.9.0 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.8.0 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.7.1 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.7.0 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.6.0 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.5.0 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.4.1 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.4.0 engine/app/views/good_job/dashboards/index.html.erb
good_job-1.3.6 engine/app/views/good_job/dashboards/index.html.erb