added statistics page

This commit is contained in:
joachim lusiardi
2015-03-05 21:14:21 +01:00
parent a8b6789295
commit 4588cf20f1
4 changed files with 59 additions and 1 deletions

36
templates/statistics.html Normal file
View File

@@ -0,0 +1,36 @@
{% extends "layout.html" %}
{% block navigation %}
<li><a href='{{ url_for('getPitStops') }}'>Home</a></li>
<li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('getStatistics') }}' class="active">Statistics</a></li>
{% endblock %}
{% block body %}
<table>
<tr>
<th>Number of Pitstops:</th>
<td>{{ data.count }}</td>
</tr>
<tr>
<th>Logged Distance:</th>
<td>{{ data.distance }} km</td>
</tr>
<tr>
<th>Average Distance:</th>
<td>{{ data.averageDistance }} km</td>
</tr>
<tr>
<th>Litres fuelled:</th>
<td>{{ data.litres }} l</td>
</tr>
<tr>
<th>Average Litres fuelled:</th>
<td>{{ data.averageListresFuelled }} l</td>
</tr>
<tr>
<th>Average Litres used:</th>
<td>{{ data.averageListresUsed }} l/100km</td>
</tr>
</table>
{% endblock %}