Display paths
This commit is contained in:
parent
e7eafee84f
commit
4e75b89212
|
@ -62,7 +62,24 @@
|
|||
<canvas id="backup_csize_hourly" width="400" height="200"></canvas>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>No repos found.</p>
|
||||
<div style="width: 600px;" class="repo-container shadow rounded bg-primary overflow-hidden">
|
||||
<div style="width: 600px;" class="repo-container shadow rounded bg-primary overflow-hidden">
|
||||
<h2 class="h2">No repositories found</h2>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if location_list %}
|
||||
<div style="width: 600px;" class="repo-container shadow rounded bg-primary overflow-hidden">
|
||||
<h2 class="h2">Paths</h2>
|
||||
{% for location in location_list %}
|
||||
<dl class="att-label row ps-3">
|
||||
<dt class="col-3">{{ location.label }}</dt>
|
||||
<dd class="col-9">{{ location.short_description }}</dd>
|
||||
</dl>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -11,12 +11,14 @@ from datetime import datetime, timedelta
|
|||
|
||||
def index(request):
|
||||
repo_list = Repo.objects.all()
|
||||
location_list = Location.objects.all()
|
||||
|
||||
repo_dict = repo_daily_dict(repo_list, 24)
|
||||
|
||||
context = {
|
||||
'repo_list': repo_list,
|
||||
'hour_list': repo_dict
|
||||
'hour_list': repo_dict,
|
||||
'location_list': location_list,
|
||||
}
|
||||
return render(request, 'borg/index.html', context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user