Просмотр исходного кода

Merge branch 'develop' into feature

jeremystretch 3 лет назад
Родитель
Сommit
fcfdbfc2b5
2 измененных файлов с 6 добавлено и 0 удалено
  1. 1 0
      docs/release-notes/version-3.1.md
  2. 5 0
      netbox/dcim/filtersets.py

+ 1 - 0
docs/release-notes/version-3.1.md

@@ -5,6 +5,7 @@
 ### Enhancements
 
 * [#8163](https://github.com/netbox-community/netbox/issues/8163) - Show bridge interface members under interface view
+* [#8365](https://github.com/netbox-community/netbox/issues/8365) - Enable filtering child devices by parent device ID
 * [#8785](https://github.com/netbox-community/netbox/issues/8785) - Permit wildcard values in IP address DNS names
 * [#8790](https://github.com/netbox-community/netbox/issues/8790) - Include site and prefixes columns in VLAN group VLANs table
 * [#8830](https://github.com/netbox-community/netbox/issues/8830) - Add Checkpoint ClusterXL protocol for FHRP groups

+ 5 - 0
netbox/dcim/filtersets.py

@@ -751,6 +751,11 @@ class DeviceFilterSet(NetBoxModelFilterSet, TenancyFilterSet, ContactModelFilter
         to_field_name='slug',
         label='Role (slug)',
     )
+    parent_device_id = django_filters.ModelMultipleChoiceFilter(
+        field_name='parent_bay__device',
+        queryset=Device.objects.all(),
+        label='Parent Device (ID)',
+    )
     platform_id = django_filters.ModelMultipleChoiceFilter(
         queryset=Platform.objects.all(),
         label='Platform (ID)',