1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#8580 add interface filters for connected

This commit is contained in:
Arthur
2022-09-07 15:45:01 -07:00
parent b702822857
commit b4877e7fac
2 changed files with 28 additions and 0 deletions

View File

@@ -1009,6 +1009,7 @@ class InterfaceFilterForm(DeviceComponentFilterForm):
('PoE', ('poe_mode', 'poe_type')),
('Wireless', ('rf_role', 'rf_channel', 'rf_channel_width', 'tx_power')),
('Device', ('region_id', 'site_group_id', 'site_id', 'location_id', 'rack_id', 'virtual_chassis_id', 'device_id')),
('Connection', ('cabled', 'connected', 'is_occupied'))
)
kind = MultipleChoiceField(
choices=InterfaceKindChoices,
@@ -1087,6 +1088,24 @@ class InterfaceFilterForm(DeviceComponentFilterForm):
label='VRF'
)
tag = TagFilterField(model)
cabled = forms.NullBooleanField(
required=False,
widget=StaticSelect(
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
connected = forms.NullBooleanField(
required=False,
widget=StaticSelect(
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
is_occupied = forms.NullBooleanField(
required=False,
widget=StaticSelect(
choices=BOOLEAN_WITH_BLANK_CHOICES
)
)
class FrontPortFilterForm(DeviceComponentFilterForm):