Change color interface background (enabled/disabled/connected) #9336

Closed
opened 2025-12-29 20:48:40 +01:00 by adam · 2 comments
Owner

Originally created by @PieterL75 on GitHub (Mar 8, 2024).

NetBox version

v3.7.3

Feature type

Data model extension

Proposed functionality

This is revisit of #13264

Currently the background color of an interface is like this :
disabled: red
virtual: blue
enabled, marked_connected: green
enabled, connected (cable status color) : green/blue/..
enabled, no cable : white

def get_cabletermination_row_class(record):
    if record.mark_connected:
        return 'success'
    elif record.cable:
        return record.cable.get_status_color()
    return ''

def get_interface_row_class(record):
    if not record.enabled:
        return 'danger'
    elif record.is_virtual:
        return 'primary'
    return get_cabletermination_row_class(record)

My proposal is to change the color coding to:

disabled: white
virtual: blue
enabled, marked_connected: green
enabled, connected (cable status color) : green/blue/...
enabled, no cable : red

def get_cabletermination_row_class(record):
    if record.mark_connected:
        return 'success'
    elif record.cable:
        return record.cable.get_status_color()
    return 'danger'


def get_interface_row_class(record):
    if not record.enabled:
        return ''
    elif record.is_virtual:
        return 'primary'
    return get_cabletermination_row_class(record)

Use case

The 'red' color is confusing, as it tells me something is 'wrong'. but having an interface in the disable state is not wrong.
image
vs
image

Having an 'enabled' interface, without a cable is 'danger'
A disabled interface is just good, that can be white.

Can we have a poll with the community to see what they prefer ?

Database changes

No response

External dependencies

No response

Originally created by @PieterL75 on GitHub (Mar 8, 2024). ### NetBox version v3.7.3 ### Feature type Data model extension ### Proposed functionality This is revisit of #13264 Currently the background color of an interface is like this : disabled: red virtual: blue enabled, marked_connected: green enabled, connected (cable status color) : green/blue/.. enabled, no cable : white ``` def get_cabletermination_row_class(record): if record.mark_connected: return 'success' elif record.cable: return record.cable.get_status_color() return '' def get_interface_row_class(record): if not record.enabled: return 'danger' elif record.is_virtual: return 'primary' return get_cabletermination_row_class(record) ``` My proposal is to change the color coding to: disabled: white virtual: blue enabled, marked_connected: green enabled, connected (cable status color) : green/blue/... enabled, no cable : red ``` def get_cabletermination_row_class(record): if record.mark_connected: return 'success' elif record.cable: return record.cable.get_status_color() return 'danger' def get_interface_row_class(record): if not record.enabled: return '' elif record.is_virtual: return 'primary' return get_cabletermination_row_class(record) ``` ### Use case The 'red' color is confusing, as it tells me something is 'wrong'. but having an interface in the disable state is not wrong. ![image](https://github.com/netbox-community/netbox/assets/74899468/c4ba9960-8e56-4fe1-807e-772c057ea202) vs ![image](https://github.com/netbox-community/netbox/assets/74899468/f2e9a177-0911-40fb-9bea-36f003cff1d8) Having an 'enabled' interface, without a cable is 'danger' A disabled interface is just good, that can be white. Can we have a poll with the community to see what they prefer ? ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 20:48:40 +01:00
adam closed this issue 2025-12-29 20:48:40 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 8, 2024):

We've done away with the row coloring entirely in the v4.0 UI, largely because people keep wanting to make different changes to it like the one being proposed. With the recently added ability to selectively filter interfaces based on type, enabled state, etc. the coloring doesn't provide much value.

@jeremystretch commented on GitHub (Mar 8, 2024): We've done away with the row coloring entirely in the v4.0 UI, largely because people keep wanting to make different changes to it like the one being proposed. With the recently added ability to selectively filter interfaces based on type, enabled state, etc. the coloring doesn't provide much value.
Author
Owner

@jeremystretch commented on GitHub (Apr 3, 2024):

This doesn't seem to have attracted any interest, but we can revisit the idea if it surfaces in the feedback for the new UI.

@jeremystretch commented on GitHub (Apr 3, 2024): This doesn't seem to have attracted any interest, but we can revisit the idea if it surfaces in the feedback for the new UI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9336