Added monthly stats.
This commit is contained in:
parent
a64f842b83
commit
8d98476a4b
@ -24,5 +24,10 @@ class ServerDetailView(generic.DetailView):
|
|||||||
context['weekly_average'] = avg
|
context['weekly_average'] = avg
|
||||||
context['weekly_min'] = min
|
context['weekly_min'] = min
|
||||||
context['weekly_max'] = max
|
context['weekly_max'] = max
|
||||||
|
|
||||||
|
avg, min, max = server.calc_player_stats(days=31)
|
||||||
|
context['monthly_average'] = avg
|
||||||
|
context['monthly_min'] = min
|
||||||
|
context['monthly_max'] = max
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,12 @@
|
|||||||
<th>{{weekly_min}}</th>
|
<th>{{weekly_min}}</th>
|
||||||
<th>{{weekly_max}}</th>
|
<th>{{weekly_max}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Last month</th>
|
||||||
|
<th>{{monthly_average|floatformat}}</th>
|
||||||
|
<th>{{monthly_min}}</th>
|
||||||
|
<th>{{monthly_max}}</th>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div id="chart"></div>
|
<div id="chart"></div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user