Add more stats.

This commit is contained in:
Jim Driessen
2017-09-28 17:25:21 +02:00
committed by Daan Sprenkels
parent cbc9284865
commit 04cdce9ad4
6 changed files with 148 additions and 19 deletions

View File

@ -9,13 +9,14 @@
<div class="col-md-6">
<h2>Uploads</h2>
<h4>Total: {{ total_uploads }}</h4>
<h4>Top {{ stats_top_count }}:</h4>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>User</th>
<th># Songs</th>
<th>#&nbsp;Songs</th>
</tr>
</thead>
<tbody>
@ -33,13 +34,14 @@
<div class="col-md-6">
<h2>Requests</h2>
<h4>Total: {{ total_requests }}</h4>
<h4>Top {{ stats_top_count }}:</h4>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>User</th>
<th># Requests</th>
<th>#&nbsp;Requests</th>
</tr>
</thead>
<tbody>
@ -54,5 +56,81 @@
</table>
</div>
</div>
<div class="col-md-6">
<h2>Unique requests</h2>
<h4>Top {{ stats_top_count }}:</h4>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>User</th>
<th>#&nbsp;Requests</th>
</tr>
</thead>
<tbody>
{% for stat in unique_request_stats %}
<tr>
<th>{{ forloop.counter }}</th>
<td>{{ stat.user__name }}</td>
<td>{{ stat.total }} ({{stat.ratio }}%)</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<h2>Most played songs</h2>
<h4>Top {{ stats_top_count }}:</h4>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Artist</th>
<th>Title</th>
<th>#&nbsp;Requests</th>
</tr>
</thead>
<tbody>
{% for stat in most_played_songs %}
<tr>
<th>{{ forloop.counter }}</th>
<td>{{ stat.song__artist }}</td>
<td>{{ stat.song__title }}</td>
<td>{{ stat.total }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<h2>Most played songs last 14 days</h2>
<h4>Top {{ stats_top_count }}:</h4>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Artist</th>
<th>Title</th>
<th>#&nbsp;Requests</th>
</tr>
</thead>
<tbody>
{% for stat in most_played_songs_14_days %}
<tr>
<th>{{ forloop.counter }}</th>
<td>{{ stat.song__artist }}</td>
<td>{{ stat.song__title }}</td>
<td>{{ stat.total }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}