community-backup/community_backup/webui/templates/borg_list.html

56 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="d-flex">
<h1>Your Borg Repositories</h1>
<div class="p-2 ms-auto">
<a class="btn btn-primary" href="{% url 'borg_add' %}" role="button">Add Repository</a>
</div>
</div>
<row>
<p>Create a borg repository by specifying a name and the SSH public key that is allowed to access this repository. The name is only for your convenience. To set up the repository please follow the <a href="https://borgbackup.readthedocs.io/en/stable/">BorgBackup documentation</a>. There is also a <a href="https://borgbackup.readthedocs.io/en/stable/quickstart.html">Quick start guide</a> available.
<b>Always use encrypted backups!</b></p>
</row>
<table class="table table-striped table-hover">
<thead>
<th>Name</th>
<th>Key</th>
<th>Repo-URL</th>
<th>Quota (used/total)</th>
<th></th>
</thead>
<tbody>
{% for repo in object_list %}
<tr>
<td>{{ repo.name }}</td>
<td style="word-break: break-all"><code>{{ repo.truncated_key }}</code></td>
<td style="word-break: break-all"><code>{{ repo.repo_url }}</code></td>
<td>{% if repo.used_quota < 0 %}not initialized{% else %}{{ repo.used_quota }}/{{ repo.quota }} GB{% endif %}</td>
<td><a href="{% url 'borg_update' pk=repo.pk %}" class="btn btn-warning btn-sm">Edit</a>
<a href="{% url 'borg_delete' pk=repo.pk %}" class="btn btn-danger btn-sm">Delete</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if BORG_SERVER_PUBKEYS %}
<div class="card">
<div class="card-header">
<h4>Borg Server Public Keys</h4>
</div>
<ul class="list-group list-group-flush">
{% for key, fingerprint in BORG_SERVER_PUBKEYS %}
<li class="list-group-item">
<span style="word-break: break-all"><code>{{ key }}</code></span><br>
<span style="word-break: break-all"><code>{{ fingerprint }}</code></span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}