67 lines
2 KiB
HTML
67 lines
2 KiB
HTML
<h2>Workers</h2>
|
|
|
|
{% if workers.is_empty() %}
|
|
<p>No workers connected</p>
|
|
{% else %}
|
|
<table class="queue-workers">
|
|
<thead>
|
|
<tr>
|
|
<th>worker</th>
|
|
<th>status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for worker in workers %}
|
|
<tr>
|
|
<td>{{ worker.link|safe }}</td>
|
|
{% match worker.status %}
|
|
{% when Status::Idle %}
|
|
<td>idle</td>
|
|
{% when Status::Busy %}
|
|
<td>busy</td>
|
|
{% when Status::Working with (link) %}
|
|
<td>{{ link|safe }}</td>
|
|
{% endmatch %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
<h2>Queue ({{ tasks.len() }})</h2>
|
|
|
|
<form class="queue-commits" method="post">
|
|
<table id="queue" data-count="{{ tasks.len() }}">
|
|
<thead>
|
|
<tr>
|
|
<th>commit</th>
|
|
<th>since</th>
|
|
<th>priority</th>
|
|
<th>worker</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for task in tasks %}
|
|
<tr {% if task.odd %} class="odd" {% endif %}>
|
|
<td>{{ task.commit|safe }}</td>
|
|
<td>
|
|
{{ task.since }}
|
|
[<a href="{{ task.link_delete }}" title="Delete from queue">del</a>]
|
|
</td>
|
|
<td>
|
|
{{ task.priority }}
|
|
[<button class="linkish" title="Increase priority by 1" formaction="{{ task.link_increase }}"
|
|
name="hash" value="{{ task.hash }}">inc</button>/<button class="linkish"
|
|
title="Decrease priority by 1" formaction="{{ task.link_decrease }}" name="hash"
|
|
value="{{ task.hash }}">dec</button>]
|
|
</td>
|
|
{% if task.workers.is_empty() %}
|
|
<td>-</td>
|
|
{% else %}
|
|
<td>{{ task.workers|join(", ")|safe }}</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</form>
|