Files
OpenBench/Templates/OpenBench/index.html
T

144 lines
5.9 KiB
HTML

{% extends "OpenBench/base.html" %}
{% load mytags uitags %}
{% block page_head %}<div><h1 class="page-title">Tests</h1><p class="page-sub">Pending, active and finished workloads</p></div>{% endblock %}
{% block content %}
<!-- Overview cards for the front page of the Index, and of User pages -->
{% if status and paging.page == 1 %}
{% with fleet=status|fleet_stats %}
<div class="stat-grid">
<div class="stat-card">
<span class="stat-icon"><i class="fa-solid fa-bolt"></i></span>
<div>
<div class="stat-value">{{ active|length }}</div>
<div class="stat-label">Running</div>
</div>
</div>
<div class="stat-card stat-yellow">
<span class="stat-icon"><i class="fa-solid fa-hourglass-half"></i></span>
<div>
<div class="stat-value">{{ pending|length }}</div>
<div class="stat-label">Pending approval</div>
</div>
</div>
<div class="stat-card stat-purple">
<span class="stat-icon"><i class="fa-solid fa-hammer"></i></span>
<div>
<div class="stat-value">{{ awaiting|length }}</div>
<div class="stat-label">Awaiting artifacts</div>
</div>
</div>
{% if fleet %}
<div class="stat-card stat-green">
<span class="stat-icon"><i class="fa-solid fa-microchip"></i></span>
<div>
<div class="stat-value">{{ fleet.machines }}</div>
<div class="stat-label">Machines online</div>
<div class="stat-sub">{{ fleet.threads }} threads &middot; {{ fleet.mnps }} MNPS</div>
</div>
</div>
{% endif %}
</div>
{% endwith %}
{% endif %}
<!-- Only show Pending tests for the front page of the Index -->
{% if paging.page == 1 %}
<!-- Currently Pending tests (Waiting to be approved) -->
{% if pending %}
<section class="card">
<header class="card-head">
<h2 class="card-title">Pending</h2>
<span class="count">{{ pending|length }}</span>
</header>
<table class="test-list stripes hoverable">
{% include "OpenBench/Blocks/testhead.html" %}
<tbody>
{% for test in pending %}
<tr>
{% include "OpenBench/Blocks/testsummary.html" %}
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
<!-- Currently Awaiting tests (Waiting for Artifacts) -->
{% if awaiting %}
<section class="card">
<header class="card-head">
<h2 class="card-title">Awaiting Artifacts</h2>
<span class="count">{{ awaiting|length }}</span>
</header>
<table class="test-list stripes hoverable">
{% include "OpenBench/Blocks/testhead.html" %}
<tbody>
{% for test in awaiting %}
<tr>
{% include "OpenBench/Blocks/testsummary.html" %}
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
<!-- Currently Running tests (Waiting to be completed) -->
{% if active %}
<section class="card">
<header class="card-head">
<h2 class="card-title">Active {{status}}</h2>
<span class="count">{{ active|length }}</span>
</header>
<table class="test-list stripes hoverable">
{% include "OpenBench/Blocks/testhead.html" %}
<tbody>
{% for test in active %}
<!-- Add two empty rows ( for the colouring scheme ) when changing prio -->
{% with prev_test=active|previous:forloop.counter0 %}
{% if prev_test and prev_test.priority != test.priority %}
<tr class="table-spacer-small"><td colspan='6'></td></tr>
<tr class="table-spacer-small"><td colspan='6'></td></tr>
{% endif %}
{% endwith %}
<tr>
{% include "OpenBench/Blocks/testsummary.html" %}
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% endif %}
<!-- Tests which have already finished -->
<section class="card">
<header class="card-head">
<h2 class="card-title">Finished</h2>
</header>
<table class="test-list stripes hoverable">
{% include "OpenBench/Blocks/testhead.html" %}
<tbody>
{% for test in completed %}
<tr>
{% include "OpenBench/Blocks/testsummary.html" %}
</tr>
{% empty %}
<tr class="empty-row"><td colspan="6"><i class="fa-regular fa-folder-open"></i>No finished tests yet.</td></tr>
{% endfor %}
</tbody>
</table>
</section>
{% include "OpenBench/Blocks/pagebrowser.html" %}
{% endblock %}