mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 08:53:46 +00:00
Repare logs/stats
This commit is contained in:
parent
26ebd7e20c
commit
edfd908eb9
2 changed files with 3 additions and 8 deletions
|
@ -1,8 +1,3 @@
|
||||||
<ul class="pagination nav navbar-nav">
|
|
||||||
<li><a href="?onglet=1">1 mois</a></li>
|
|
||||||
<li><a href="?onglet=2">2 mois</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{% for key_dict, stats_dict in stats_list.items %}
|
{% for key_dict, stats_dict in stats_list.items %}
|
||||||
{% for key, stats in stats_dict.items %}
|
{% for key, stats in stats_dict.items %}
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
|
|
|
@ -126,9 +126,9 @@ def stats_users(request):
|
||||||
start_date = timezone.now() + relativedelta(months=-search_field[1])
|
start_date = timezone.now() + relativedelta(months=-search_field[1])
|
||||||
stats = {
|
stats = {
|
||||||
'Utilisateur' : {
|
'Utilisateur' : {
|
||||||
'Machines' : User.objects.filter(registered__gt=search_field[1]).annotate(num=Count('machine')).order_by('-num')[:10],
|
'Machines' : User.objects.annotate(num=Count('machine')).order_by('-num')[:10],
|
||||||
'Facture' : User.objects.filter(registered__gt=search_field[1]).annotate(num=Count('facture')).order_by('-num')[:10],
|
'Facture' : User.objects.annotate(num=Count('facture')).order_by('-num')[:10],
|
||||||
'Bannissement' : User.objects.filter(registered__gt=search_field[1]).annotate(num=Count('ban')).order_by('-num')[:10],
|
'Bannissement' : User.objects.annotate(num=Count('ban')).order_by('-num')[:10],
|
||||||
'Accès gracieux' : User.objects.annotate(num=Count('whitelist')).order_by('-num')[:10],
|
'Accès gracieux' : User.objects.annotate(num=Count('whitelist')).order_by('-num')[:10],
|
||||||
'Droits' : User.objects.annotate(num=Count('right')).order_by('-num')[:10],
|
'Droits' : User.objects.annotate(num=Count('right')).order_by('-num')[:10],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue