OXYGENHUB
◆ v0.9.21 oxygenhub / templates / admin_storage.html
1.7 KiB · HTML · last changed Administration: a sidebar of grouped pages, one page per section (closes #288) 15 days ago source blame history raw
8fb35df7 Andy McCall ↶ 1
{% extends "base.html" %}
737de0fa Andy McCall ↶ 2
{% import "admin_nav.html" as an %}
8fb35df7 Andy McCall ↶ 3
{% block title %}Storage · Administration{% endblock %}
4
{% block content %}
5
<div class="head"><h1>Storage <small>{{ rows.len() }} repositories · {{ total|bytes }}</small></h1></div>
737de0fa Andy McCall ↶ 6
<div class="settings-layout">
7
{% call an::nav(crate::web::admin::AdminSection::Storage) %}
8
<div class="sections settings-body">
8fb35df7 Andy McCall ↶ 9
<p><a href="/admin">← administration</a></p>
10
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %}
11
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
12
<p class="small mute">Maintenance runs <code>oxy gc</code> on the hub's copy: loose objects go into a pack, and unreachable objects older than the grace period are pruned. Each repository is locked for writing while it runs.</p>
13
<form class="tiny" method="post" action="/admin/storage"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="repo" value="*"><button type="submit">MAINTAIN EVERY REPOSITORY</button></form>
14
<table class="list">
15
  <thead><tr><th>Repository</th><th>On disk</th><th>Loose objects</th><th>Packs</th><th></th></tr></thead>
16
  <tbody>
17
  {% for r in rows %}
166f6e9b Andy McCall 18
  <tr><td><a href="/{{ r.slug }}">{{ r.slug }}</a>{% if r.drop %} <span class="tag">drop</span>{% endif %}</td><td>{{ r.bytes|bytes }}</td><td>{{ r.loose }}{% if r.loose > 1000 %} <span class="tag warn">pack me</span>{% endif %}</td><td>{{ r.packs }}</td>
8fb35df7 Andy McCall ↶ 19
  <td><form class="tiny" method="post" action="/admin/storage"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="repo" value="{{ r.slug }}"><button type="submit">maintain</button></form></td></tr>
20
  {% endfor %}
21
  </tbody>
22
</table>
737de0fa Andy McCall ↶ 23
</div>
24
</div>
8fb35df7 Andy McCall ↶ 25
{% endblock %}