mirror of
https://github.com/drygdryg/netbox-plugin-device-map.git
synced 2024-11-29 21:50:53 +03:00
Just use all devices
This commit is contained in:
parent
598461654d
commit
c2d6b459c5
@ -25,11 +25,11 @@ class MapView(PermissionRequiredMixin, View):
|
|||||||
"""Device map view"""
|
"""Device map view"""
|
||||||
form = self.form(request.GET)
|
form = self.form(request.GET)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
interfaces = Interface.objects.all()
|
#interfaces = Interface.objects.all()
|
||||||
#vlan = form.cleaned_data['vlan']
|
#vlan = form.cleaned_data['vlan']
|
||||||
|
|
||||||
#interfaces = interfaces.filter(Q(untagged_vlan=vlan) | Q(tagged_vlans=vlan))
|
#interfaces = interfaces.filter(Q(untagged_vlan=vlan) | Q(tagged_vlans=vlan))
|
||||||
devices = Device.objects.filter(interfaces__in=interfaces).distinct()
|
devices = Device.objects.all().distinct()
|
||||||
if device_roles := form.cleaned_data['device_roles']:
|
if device_roles := form.cleaned_data['device_roles']:
|
||||||
devices = devices.filter(role__in=device_roles)
|
devices = devices.filter(role__in=device_roles)
|
||||||
print(f"Device roles are :{device_roles}")
|
print(f"Device roles are :{device_roles}")
|
||||||
|
Loading…
Reference in New Issue
Block a user