Port queue page to maud
This commit is contained in:
parent
b3f8c6390c
commit
5d4232ac6b
6 changed files with 131 additions and 159 deletions
|
|
@ -1,23 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}queue ({{ inner.tasks.len() }}){% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<script type="module" src="{{ link_queue_js }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="inner">{{ inner|safe }}</div>
|
||||
|
||||
<form method="post" action="{{ link_admin_queue_add_batch }}">
|
||||
<label>
|
||||
Batch size:
|
||||
<input type="number" name="amount" value="10" min="1">
|
||||
</label>
|
||||
<label>
|
||||
Priority:
|
||||
<input type="number" id="priority" name="priority" value="-1" min="-2147483648" max="2147483647">
|
||||
</label>
|
||||
<button>Add batch to queue</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}del {{ short }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<h2>Delete commit from queue</h2>
|
||||
|
||||
<p>You are about to delete this commit from the queue:</p>
|
||||
<p>{{ commit|safe }}</p>
|
||||
<p>All runs of this commit currently in progress will be aborted!</p>
|
||||
|
||||
<form method="post" action="{{ link_delete }}">
|
||||
<input type="hidden" name="hash" value="{{ hash }}">
|
||||
<button>Delete commit and abort runs</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue