69 lines
1.9 KiB
HTML
69 lines
1.9 KiB
HTML
<h2>Workers</h2>
|
|
|
|
{% if workers.is_empty() %}
|
|
<p>No workers connected</p>
|
|
{% else %}
|
|
<table>
|
|
<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>
|
|
|
|
<table id="queue" data-count="{{ tasks.len() }}">
|
|
<thead>
|
|
<tr>
|
|
<th>commit</th>
|
|
<th>since</th>
|
|
<th>prio</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 }}
|
|
[<form method="post" action="{{ task.link_increase }}">
|
|
<input type="hidden" name="hash" value="{{ task.hash }}">
|
|
<button title="Increase priority by 1">inc</button>
|
|
</form>,
|
|
<form method="post" action="{{ task.link_decrease }}">
|
|
<input type="hidden" name="hash" value="{{ task.hash }}">
|
|
<button title="Decrease priority by 1">dec</button>
|
|
</form>]
|
|
</td>
|
|
{% if task.workers.is_empty() %}
|
|
<td>-</td>
|
|
{% else %}
|
|
<td>{{ task.workers|join(", ")|safe }}</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|