/
status.html
56 lines (56 loc) · 2.51 KB
/
status.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{% extends 'layout.html' %}
{% import 'include/chartkick.html' as chartkick with context %}
{% set active_page='status' %}
{% block title %}
{% trans %}Status{% endtrans %}
{% endblock %}
{% block body %}
<div class="container">
{% include 'message.html' %}
<h2>{% trans %}Backup Status{% endtrans %}</h2>
<p>{% trans %}Number of backup per days{% endtrans %}</p>
{{ chartkick.line_chart(backup_count) }}
{% for date, items in data.items()|sort(attribute='0',reverse=1) %}
<h3>
{% trans %}Backup for{% endtrans %} <time class="js-date" datetime="{{ date }}">{{ date }}</time> ({{ items|length }})
</h3>
{% if items %}
<ul class="list-group">
{% for i in items|sort(attribute='repo.display_name') %}
<li class="list-group-item">
<div class="row">
<div class="col-sm-3">
<h4>
<a href="{{ url_for('browse', i.repo)}}"><i class="icon-hdd"></i> {{ i.repo.display_name }}</a>
</h4>
</div>
<div class="col-sm-3">
{% trans %}Start Time:{% endtrans %} <time class="js-time" datetime="{{ i.starttime }}">{{ i.starttime | lastupdated }}</time>
<br/>
{% trans %}End Time:{% endtrans %} <time class="js-time" datetime="{{ i.endtime }}">{{ i.endtime | lastupdated }}</time>
<br/>
{% trans %}Elapsed time:{% endtrans %} {{ i.elapsedtime }} seconds
<br/>
</div>
<div class="col-sm-3">
{% trans %}New files:{% endtrans %} {{ i.newfiles }} ({{ i.newfilesize|filesize }})
<br/>
{% trans %}Deleted files:{% endtrans %} {{ i.deletedfiles }} ({{ i.deletedfilesize|filesize }})
<br/>
{% trans %}Changed files:{% endtrans %} {{ i.changedfiles }} ({{ i.changedsourcesize|filesize }})
<br/>
{% trans %}Increment files:{% endtrans %} {{ i.incrementfiles }} ({{ i.incrementfilesize|filesize }})
</div>
<div class="col-sm-3">
<a href="{{ url_for('logs', i.repo, date=i.starttime|int)}}">{% trans %}Error count:{% endtrans %} {{ i.errors }}</a>
</div>
</div>
</li>
{% endfor %}
</ul>
{% else %}
<p>{% trans %}No backup for this date.{% endtrans %}</p>
{% endif %}
{% endfor %}
</div>
{% endblock %}