| 1 |
{% extends "base.html" %} |
| 2 |
{% import "admin_nav.html" as an %} |
| 3 |
{% block title %}Images · Administration{% endblock %} |
| 4 |
{% block content %} |
| 5 |
{# The swarm (docs/backgrounds.md §2): the hub and the runners, and the |
| 6 |
images moving between them. #} |
| 7 |
<script type="application/json" id="backdrop-data">{{ backdrop|safe }}</script> |
| 8 |
{% include "backdrop.html" %} |
| 9 |
<div data-backdrop-avoid> |
| 10 |
<div class="head"><h1>Runners <small>{{ images.len()|plural("image", "images") }} · {{ on_hub }} on the hub · <a href="/admin">Administration</a></small></h1></div> |
| 11 |
<div class="settings-layout"> |
| 12 |
{% call an::nav(crate::web::admin::AdminSection::Images) %} |
| 13 |
<div class="sections settings-body"> |
| 14 |
<div class="bar"><span class="modes"><a href="/admin/runners">runners</a><a href="/admin/runners/images" class="on">images</a><a href="/admin/runners/settings">settings</a></span></div> |
| 15 |
<p class="small mute">Every rootfs image a runner holds, the hub keeps, or a job ran on in the last 90 days, newest use first. {% if swarm.is_empty() %}No runner shares images peer to peer yet: give one a <code>[runner.swarm]</code> section.{% else %}Sharing images peer to peer: {% for s in swarm %}{{ s }}{% if !loop.last %}, {% endif %}{% endfor %}.{% endif %} Send an image to the hub with <code>flow rootfs push HASH</code>.</p> |
| 16 |
{% if images.is_empty() %} |
| 17 |
<p class="mute">No images yet.</p> |
| 18 |
{% else %} |
| 19 |
<div class="table"><table class="images"> |
| 20 |
<tr><th>Image</th><th>Size</th><th>Where</th><th>Used by</th><th>Sent</th></tr> |
| 21 |
{% for i in images %} |
| 22 |
<tr{% if i.stranded() %} class="stranded"{% endif %}> |
| 23 |
<td><code class="chip" title="{{ i.hash }}">{{ i.hash|short }}</code>{% if !i.arch.is_empty() %} <span class="tag">{{ i.arch }}</span>{% endif %}</td> |
| 24 |
<td class="small">{% if let Some(s) = i.size %}{{ s|bytes }}{% else %}<span class="mute" title="Only the hub's copy is measured">—</span>{% endif %}</td> |
| 25 |
<td>{% if i.stranded() %}<span class="tag bad" title="A job pinning it will wait until it is sent: flow rootfs push">nowhere</span>{% endif %}{% for p in i.places %}<span class="lbl img-{{ p.kind }}" title="{{ p.title }}">{% if p.kind == "fetching" %}⇣ {% endif %}{{ p.name }}</span>{% endfor %}</td> |
| 26 |
<td class="small">{% for (repo, jobs, last) in i.uses %}<div><a href="/{{ repo }}/runs">{{ repo }}</a> <span class="mute">{{ jobs|plural("job", "jobs") }}, <time title="{{ last|when_i }}">{{ last|ago_i }}</time></span></div>{% endfor %}{% if i.uses.is_empty() %}<span class="mute">no recent jobs</span>{% endif %}</td> |
| 27 |
<td class="small">{% if let Some((who, when)) = i.sent %}{{ who }} <time class="mute" title="{{ when|when_i }}">{{ when|ago_i }}</time>{% else %}<span class="mute">not on the hub</span>{% endif %}</td> |
| 28 |
</tr> |
| 29 |
{% endfor %} |
| 30 |
</table></div> |
| 31 |
{% endif %} |
| 32 |
</div> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
{% endblock %} |