OXYGENHUB
◆ close-proposal-140 oxygenhub / templates / admin_images.html
2.4 KiB · HTML · last changed Admin › Runners › Images: what images are where 23 days ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Images · Administration{% endblock %}
3
{% block mainclass %} class="wide"{% endblock %}
4
{% block content %}
5
<div class="head"><h1>Runners <small>{{ images.len()|plural("image", "images") }} · {{ on_hub }} on the hub · <a href="/admin">Administration</a></small></h1></div>
6
<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>
7
<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>
8
{% if images.is_empty() %}
9
<p class="mute">No images yet.</p>
10
{% else %}
11
<div class="table"><table class="images">
12
  <tr><th>Image</th><th>Size</th><th>Where</th><th>Used by</th><th>Sent</th></tr>
13
  {% for i in images %}
14
  <tr{% if i.stranded() %} class="stranded"{% endif %}>
15
    <td><code class="chip" title="{{ i.hash }}">{{ i.hash|short }}</code>{% if !i.arch.is_empty() %} <span class="tag">{{ i.arch }}</span>{% endif %}</td>
16
    <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>
17
    <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>
18
    <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>
19
    <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>
20
  </tr>
21
  {% endfor %}
22
</table></div>
23
{% endif %}
24
{% endblock %}