OXYGENHUB
# 4cc40ccc6034 oxygenhub / templates / admin_images.html
2.6 KiB · HTML · last changed feat(web): the mark, ripples, the swarm and adrift (closes #167) 22 days ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Images · Administration{% endblock %}
3
{% block content %}
4
{# The swarm (docs/backgrounds.md §2): the hub and the runners, and the
5
   images moving between them. #}
6
<script type="application/json" id="backdrop-data">{{ backdrop|safe }}</script>
7
{% include "backdrop.html" %}
8
<div data-backdrop-avoid>
9
<div class="head"><h1>Runners <small>{{ images.len()|plural("image", "images") }} · {{ on_hub }} on the hub · <a href="/admin">Administration</a></small></h1></div>
10
<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>
11
<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>
12
{% if images.is_empty() %}
13
<p class="mute">No images yet.</p>
14
{% else %}
15
<div class="table"><table class="images">
16
  <tr><th>Image</th><th>Size</th><th>Where</th><th>Used by</th><th>Sent</th></tr>
17
  {% for i in images %}
18
  <tr{% if i.stranded() %} class="stranded"{% endif %}>
19
    <td><code class="chip" title="{{ i.hash }}">{{ i.hash|short }}</code>{% if !i.arch.is_empty() %} <span class="tag">{{ i.arch }}</span>{% endif %}</td>
20
    <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>
21
    <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>
22
    <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>
23
    <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>
24
  </tr>
25
  {% endfor %}
26
</table></div>
27
{% endif %}
28
</div>
29
{% endblock %}