| 1 |
{% extends "base.html" %} |
| 2 |
{% block title %}Backups · Administration{% endblock %} |
| 3 |
{% block mainclass %} class="wide"{% endblock %} |
| 4 |
{% block content %} |
| 5 |
<div class="head"><h1>Backups <small>{{ owners.len()|plural("owner", "owners") }} · <a href="/admin">Administration</a></small></h1></div> |
| 6 |
<p class="small mute">Each user and organisation backs up its own repositories, to a place it controls (docs/backups.md). Here is whether each one ran and how it went; what a run wrote stays with its owner. This site's own backup runs on its host, outside the hub.</p> |
| 7 |
<section class="card-box"> |
| 8 |
<div class="card-head"><h2>Owners' backups</h2><span class="count-chip">{{ owners.len() }}</span></div> |
| 9 |
{% if owners.is_empty() %}<p class="empty small">Nobody has set up a backup yet.</p> |
| 10 |
{% else %} |
| 11 |
<div class="table"><table class="backup-runs"> |
| 12 |
<tr><th>Owner</th><th>How often</th><th>Where</th><th>Kept</th><th>Repositories</th><th>Last run</th><th>Failed today</th></tr> |
| 13 |
{% for o in owners %} |
| 14 |
<tr> |
| 15 |
<td><a href="/{{ o.setting.owner }}">{{ o.setting.owner }}</a> <span class="mute small">{% if o.setting.kind == "org" %}organisation{% else %}user{% endif %}</span></td> |
| 16 |
<td>{% if o.setting.every == "off" %}<span class="mute">off</span>{% else %}{{ o.setting.every }}{% endif %}</td> |
| 17 |
<td><code>{{ o.place() }}</code></td> |
| 18 |
<td>{{ o.setting.keep_days }} days</td> |
| 19 |
<td>{{ o.repos }}</td> |
| 20 |
<td>{% if let Some(r) = o.last %}<span class="backup-status st-{{ r.status }}">{{ r.status }}</span> <time title="{{ r.started_ms|when_i }}">{{ r.started_ms|ago_i }}</time> <span class="mute small">{{ r.repos }} repos, {{ (r.bytes / 1024) }} KiB sent</span>{% if !r.detail.is_empty() %}<div class="small mute">{{ r.detail }}</div>{% endif %}{% else %}<span class="mute">never</span>{% endif %}</td> |
| 21 |
<td>{% if o.failed_day > 0 %}<span class="backup-status st-failed">{{ o.failed_day }}</span>{% else %}<span class="mute">0</span>{% endif %}</td> |
| 22 |
</tr> |
| 23 |
{% endfor %} |
| 24 |
</table></div> |
| 25 |
{% endif %} |
| 26 |
</section> |
| 27 |
<section class="card-box"> |
| 28 |
<div class="card-head"><h2>Not backed up</h2><span class="count-chip">{{ uncovered.len() }}</span></div> |
| 29 |
{% if uncovered.is_empty() %}<p class="empty small">Every owner of a repository backs it up.</p> |
| 30 |
{% else %} |
| 31 |
<p class="small mute">These own repositories that no backup covers: their owners set one up under Settings › Backups (an organisation's under its settings).</p> |
| 32 |
<ul class="plain">{% for (owner, n) in uncovered %}<li><a href="/{{ owner }}">{{ owner }}</a> <span class="mute small">{{ n|plural("repository", "repositories") }}</span></li>{% endfor %}</ul> |
| 33 |
{% endif %} |
| 34 |
</section> |
| 35 |
{% endblock %} |