diff --git a/src/gameservers/views.py b/src/gameservers/views.py index 608df26..2711da4 100644 --- a/src/gameservers/views.py +++ b/src/gameservers/views.py @@ -24,5 +24,10 @@ class ServerDetailView(generic.DetailView): context['weekly_average'] = avg context['weekly_min'] = min 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 diff --git a/src/templates/gameservers/server_detail.html b/src/templates/gameservers/server_detail.html index 67d1954..7eee463 100644 --- a/src/templates/gameservers/server_detail.html +++ b/src/templates/gameservers/server_detail.html @@ -45,6 +45,12 @@ {{weekly_min}} {{weekly_max}} + + Last month + {{monthly_average|floatformat}} + {{monthly_min}} + {{monthly_max}} +