diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index 8939c01be..512022679 100644 --- a/netbox/dcim/tables/devices.py +++ b/netbox/dcim/tables/devices.py @@ -53,6 +53,16 @@ def get_cabletermination_row_class(record): return '' +def get_interface_row_class(record): + if not record.enabled: + return 'danger' + elif not record.is_connectable: + return 'primary' + else: + return get_cabletermination_row_class(record) + return '' + + def get_interface_state_attribute(record): """ Get interface enabled state as string to attach to