Explorar el Código

Closes #5570: Add "management only" filter widget for interfaces list

Jeremy Stretch hace 5 años
padre
commit
e9d888bf63
Se han modificado 3 ficheros con 11 adiciones y 0 borrados
  1. 4 0
      docs/release-notes/version-2.10.md
  2. 6 0
      netbox/dcim/forms.py
  3. 1 0
      netbox/dcim/tables/devices.py

+ 4 - 0
docs/release-notes/version-2.10.md

@@ -2,6 +2,10 @@
 
 ## v2.10.4 (FUTURE)
 
+### Enhancements
+
+* [#5570](https://github.com/netbox-community/netbox/issues/5570) - Add "management only" filter widget for interfaces list
+
 ### Bug Fixes
 
 * [#5584](https://github.com/netbox-community/netbox/issues/5584) - Restore power utilization panel under device view

+ 6 - 0
netbox/dcim/forms.py

@@ -2687,6 +2687,12 @@ class InterfaceFilterForm(DeviceComponentFilterForm):
             choices=BOOLEAN_WITH_BLANK_CHOICES
         )
     )
+    mgmt_only = forms.NullBooleanField(
+        required=False,
+        widget=StaticSelect2(
+            choices=BOOLEAN_WITH_BLANK_CHOICES
+        )
+    )
     mac_address = forms.CharField(
         required=False,
         label='MAC address'

+ 1 - 0
netbox/dcim/tables/devices.py

@@ -406,6 +406,7 @@ class BaseInterfaceTable(BaseTable):
 
 
 class InterfaceTable(DeviceComponentTable, BaseInterfaceTable, PathEndpointTable):
+    mgmt_only = BooleanColumn()
     tags = TagColumn(
         url_name='dcim:interface_list'
     )