Port queue page
This commit is contained in:
parent
123c27e5a2
commit
2b6c339c70
7 changed files with 44 additions and 19 deletions
|
|
@ -1,56 +0,0 @@
|
|||
{% import "util.html" as util %}
|
||||
|
||||
<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 }}</td>
|
||||
<td>{{ task.priority }}</td>
|
||||
{% if task.workers.is_empty() %}
|
||||
<td>-</td>
|
||||
{% else %}
|
||||
<td>{{ task.workers|join(", ")|safe }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Loading…
Add table
Add a link
Reference in a new issue