mirror of
https://github.com/drygdryg/netbox-plugin-device-map.git
synced 2024-11-30 06:00:52 +03:00
Remove VLAN
This commit is contained in:
parent
242fe8e320
commit
b422a926de
@ -26,7 +26,7 @@ class MapView(PermissionRequiredMixin, 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.filter(interfaces__in=interfaces).distinct()
|
||||||
@ -37,7 +37,7 @@ class MapView(PermissionRequiredMixin, View):
|
|||||||
non_geolocated_devices = set(devices) - set(geolocated_devices.keys())
|
non_geolocated_devices = set(devices) - set(geolocated_devices.keys())
|
||||||
|
|
||||||
map_data = configure_leaflet_map("geomap", geolocated_devices, form.cleaned_data['calculate_connections'])
|
map_data = configure_leaflet_map("geomap", geolocated_devices, form.cleaned_data['calculate_connections'])
|
||||||
map_data['vlan'] = vlan.id
|
#map_data['vlan'] = vlan.id
|
||||||
return render(request, self.template_name, context=dict(
|
return render(request, self.template_name, context=dict(
|
||||||
filter_form=form, map_data=map_data, non_geolocated_devices=non_geolocated_devices
|
filter_form=form, map_data=map_data, non_geolocated_devices=non_geolocated_devices
|
||||||
))
|
))
|
||||||
|
Loading…
Reference in New Issue
Block a user