mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 08:52:22 +01:00
Percentages
This commit is contained in:
committed by
Gerdriaan Mulder
parent
0f6a69626b
commit
2d721bf51a
@ -35,7 +35,7 @@
|
|||||||
<th>{{ forloop.counter }}</th>
|
<th>{{ forloop.counter }}</th>
|
||||||
<td>{{ stat.user__name }}</td>
|
<td>{{ stat.user__name }}</td>
|
||||||
<td style="text-align: right;">{{ stat.total }}</td>
|
<td style="text-align: right;">{{ stat.total }}</td>
|
||||||
<td>({% widthratio stat.total stats.total_uploads 100 %}%)</td>
|
<td>({% widthratio stat.total stats.total_uploads_perc 100 %}%)</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<th>{{ forloop.counter }}</th>
|
<th>{{ forloop.counter }}</th>
|
||||||
<td>{{ stat.user__name }}</td>
|
<td>{{ stat.user__name }}</td>
|
||||||
<td style="text-align: right;">{{ stat.total }}</td>
|
<td style="text-align: right;">{{ stat.total }}</td>
|
||||||
<td>({% widthratio stat.total stats.total_requests 100 %}%)</td>
|
<td>({% widthratio stat.total stats.total_requests_perc 100 %}%)</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h2>Unique requests</h2>
|
<h2>Unique requests</h2>
|
||||||
<p>In total <strong> {{stats.total_unique_requests.total}}</strong> different songs
|
<p>In total <strong> {{stats.total_unique_requests}}</strong> different songs
|
||||||
have been requested. The {{ stats.stats_top_count }} people that have requested the largest number of
|
have been requested. The {{ stats.stats_top_count }} people that have requested the largest number of
|
||||||
different songs are shown below.
|
different songs are shown below.
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|||||||
@ -155,11 +155,13 @@ def compute_stats():
|
|||||||
return {
|
return {
|
||||||
'last_updated': last_updated,
|
'last_updated': last_updated,
|
||||||
'total_uploads': "{0:,.0f}".format(stats['total_uploads']),
|
'total_uploads': "{0:,.0f}".format(stats['total_uploads']),
|
||||||
|
'total_uploads_perc': stats['total_uploads'],
|
||||||
'upload_stats': list(stats['upload_stats']),
|
'upload_stats': list(stats['upload_stats']),
|
||||||
'total_requests': "{0:,.0f}".format(stats['total_requests']),
|
'total_requests': "{0:,.0f}".format(stats['total_requests']),
|
||||||
|
'total_requests_perc': stats['total_requests'],
|
||||||
'request_stats': list(stats['request_stats']),
|
'request_stats': list(stats['request_stats']),
|
||||||
'unique_request_stats': list(stats['unique_request_stats']),
|
'unique_request_stats': list(stats['unique_request_stats']),
|
||||||
'total_unique_requests': stats['total_unique_requests'],
|
'total_unique_requests': "{0:,.0f}".format(stats['total_unique_requests']['total']),
|
||||||
'most_played_songs': list(stats['most_played_songs']),
|
'most_played_songs': list(stats['most_played_songs']),
|
||||||
'most_played_songs_14_days': list(stats['most_played_songs_14_days']),
|
'most_played_songs_14_days': list(stats['most_played_songs_14_days']),
|
||||||
'time_requested': stats['time_requested'],
|
'time_requested': stats['time_requested'],
|
||||||
|
|||||||
Reference in New Issue
Block a user