List runners in queue
This commit is contained in:
parent
c3c597897c
commit
f3d646c8d5
10 changed files with 243 additions and 61 deletions
|
|
@ -1,12 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}queue ({{ table.tasks.len() }}){% endblock %}
|
||||
{% block title %}queue ({{ inner.tasks.len() }}){% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<script type="module" src="main.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Queue (<span id="count">{{ table.tasks.len() }}</span>)</h2>
|
||||
<div id="queue">{{ table|safe }}</div>
|
||||
<div id="inner">{{ inner|safe }}</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
56
templates/queue_inner.html
Normal file
56
templates/queue_inner.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{% import "util.html" as util %}
|
||||
|
||||
<h2>Runners</h2>
|
||||
{% if runners.is_empty() %}
|
||||
<p>No runners connected</p>
|
||||
{% else %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>runner</th>
|
||||
<th>status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for runner in runners %}
|
||||
<tr>
|
||||
<td>{{ runner.link|safe }}</td>
|
||||
{% match runner.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>runner</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.runners.is_empty() %}
|
||||
<td>-</td>
|
||||
{% else %}
|
||||
<td>{{ task.runners|join(", ")|safe }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{% import "util.html" as util %}
|
||||
|
||||
<table class="queue">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>commit</th>
|
||||
<th>since</th>
|
||||
<th>prio</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for task in tasks %}
|
||||
<tr {% if task.odd %} class="odd" {% endif %}>
|
||||
<td>
|
||||
<a href="{{ base.root }}commit/{{ task.hash }}">
|
||||
{# {% call util::commit_short(task.short, task.reachable) %} #}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ task.since }}</td>
|
||||
<td>{{ task.priority }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Loading…
Add table
Add a link
Reference in a new issue