mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Optimisation affichage détaillé d'un switch
This commit is contained in:
parent
0794056d19
commit
08d9e04a9e
1 changed files with 5 additions and 3 deletions
|
@ -186,16 +186,18 @@ def index_port(request, switch, switchid):
|
|||
""" Affichage de l'ensemble des ports reliés à un switch particulier"""
|
||||
port_list = (Port.objects
|
||||
.filter(switch=switch)
|
||||
.select_related('room')
|
||||
.select_related('room__building__dormitory')
|
||||
.select_related('machine_interface__domain__extension')
|
||||
.select_related('machine_interface__machine__user')
|
||||
.select_related('related__switch')
|
||||
.select_related('machine_interface__machine__accesspoint')
|
||||
.select_related('related__switch__switchbay__building__dormitory')
|
||||
.prefetch_related(Prefetch(
|
||||
'related__switch__interface_set',
|
||||
queryset=(Interface.objects
|
||||
.select_related('domain__extension'))
|
||||
))
|
||||
.select_related('switch'))
|
||||
.select_related('switch__switchbay__building__dormitory')
|
||||
.select_related('switch__model__constructor'))
|
||||
port_list = SortTable.sort(
|
||||
port_list,
|
||||
request.GET.get('col'),
|
||||
|
|
Loading…
Reference in a new issue