mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-17 17:22:17 -06:00
* Add device_status as filtering option (and configurable column) for InventoryItemTable * Add device_status to common superclasses for Device Components, and refactor ChoiceFieldColumn to support a "color" callable allowing get_FOO_color behavior to be overridden * Remove unnecessary 'device_status' in fields * Add unit tests for device_status
This commit is contained in:
@@ -1411,6 +1411,10 @@ class DeviceComponentFilterSet(django_filters.FilterSet):
|
||||
to_field_name='name',
|
||||
label=_('Virtual Chassis'),
|
||||
)
|
||||
device_status = django_filters.MultipleChoiceFilter(
|
||||
choices=DeviceStatusChoices,
|
||||
field_name='device__status',
|
||||
)
|
||||
|
||||
def search(self, queryset, name, value):
|
||||
if not value.strip():
|
||||
|
||||
Reference in New Issue
Block a user