mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-25 08:23:46 +00:00
Merge branch 'new_upstream' into 'master'
New upstream See merge request nounous/re2o!12
This commit is contained in:
commit
469d96ff00
2 changed files with 1 additions and 10 deletions
|
@ -301,7 +301,7 @@ def decide_vlan_and_register_switch(nas, nas_type, port_number, mac_address):
|
||||||
|
|
||||||
sw_name = str(nas)
|
sw_name = str(nas)
|
||||||
|
|
||||||
port = Port.objects.filter(switch=Switch.objects.filter(switch_interface=nas), port=port_number).first()
|
port = Port.objects.filter(switch=Switch.objects.filter(interface_ptr=nas), port=port_number).first()
|
||||||
#Si le port est inconnu, on place sur le vlan defaut
|
#Si le port est inconnu, on place sur le vlan defaut
|
||||||
if not port:
|
if not port:
|
||||||
return (sw_name, "Chambre inconnue", u'Port inconnu', VLAN_OK)
|
return (sw_name, "Chambre inconnue", u'Port inconnu', VLAN_OK)
|
||||||
|
|
|
@ -460,13 +460,4 @@ def stats_droits(request):
|
||||||
for droit in ListRight.objects.all().select_related('group_ptr'):#.prefetch_related('group_ptr__user_set__revision_set'):
|
for droit in ListRight.objects.all().select_related('group_ptr'):#.prefetch_related('group_ptr__user_set__revision_set'):
|
||||||
stats_list[droit]=droit.user_set.all().annotate(num=Count('revision'),last=Max('revision__date_created'))
|
stats_list[droit]=droit.user_set.all().annotate(num=Count('revision'),last=Max('revision__date_created'))
|
||||||
|
|
||||||
# count,last=0,0
|
|
||||||
# for droit in ListRight.objects.all():
|
|
||||||
# for use in droit.user_set.all():
|
|
||||||
# countRevision.objects.filter(user=use).count()
|
|
||||||
# print(Revision.objects.order_by('date_created').last().date_created)
|
|
||||||
# stats_list[droit]=use.annotate(num=count,las)
|
|
||||||
|
|
||||||
#raise ValueError('temps='+str(time()-depart))
|
|
||||||
|
|
||||||
return render(request, 'logs/stats_droits.html', {'stats_list': stats_list})
|
return render(request, 'logs/stats_droits.html', {'stats_list': stats_list})
|
||||||
|
|
Loading…
Reference in a new issue