Current section

Files

Jump to
verk_web web templates queues index.html.eex
Raw

web/templates/queues/index.html.eex

<%= if Enum.empty?(@queue_stats) do %>
<p>No job was started yet.</p>
<% else %>
<div class="page-header clearfix">
<h2>Queues</h2>
<form id="queue-search" class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" name="search" class="form-control input-sm" placeholder="Search", value=<%= @search %>>
</div>
<button type="submit" class="btn btn-default btn-sm">Go</button>
</form>
<ul class="swatches clearfix">
<li><span class="swatch swatch-running"></span>running</li>
<li><span class="swatch swatch-idle"></span>idle</li>
</ul>
</div>
<table class="table table-blocks">
<thead>
<tr>
<th>Queue</th>
<th>Running</th>
<th>Enqueued</th>
<th>Processed</th>
<th>Failed</th>
<th>Lifetime Processed</th>
<th>Lifetime Failed</th>
</tr>
</thead>
<tbody>
<%= for queue <- stats(@queue_stats) do %>
<tr class="queue-row <%= if queue.running_counter == 0, do: 'is-idle' %>">
<td><%= link queue.queue, to: queues_path(@conn, :show, queue.queue) %></td>
<td><%= link queue.running_counter |> to_string , to: queues_path(@conn, :busy, queue.queue) %></td>
<td><%= link queue.enqueued_counter |> to_string, to: queues_path(@conn, :show, queue.queue) %></td>
<td><%= queue.finished_counter %></td>
<td><%= queue.failed_counter %></td>
<td class="lifetime"><%= queue.total_processed %></td>
<td class="lifetime"><%= queue.total_failed %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>