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

Closed
opened 2025-12-29 20:35:51 +01:00 by adam · 4 comments
Owner

Originally created by @PieterL75 on GitHub (Jul 25, 2023).

NetBox version

v3.5.6

Feature type

Change to existing functionality

Proposed functionality

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.

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

Database changes

No response

External dependencies

No response

Originally created by @PieterL75 on GitHub (Jul 25, 2023). ### NetBox version v3.5.6 ### Feature type Change to existing functionality ### Proposed functionality 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. Having an 'enabled' interface, without a cable is 'danger' A disabled interface is just good, that can be white. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: under reviewtopic: UI/UX labels 2025-12-29 20:35:51 +01:00
adam closed this issue 2025-12-29 20:35:51 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 13, 2023):

I'd rather not mess with a color coding scheme which by now has been well established.

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

That's a fair point. How about using a less drastic color, such as orange or yellow?

@jeremystretch commented on GitHub (Oct 13, 2023): I'd rather not mess with a color coding scheme which by now has been well established. > The 'red' color is confusing, as it tells me something is 'wrong'. but having an interface in the disable state is not wrong. That's a fair point. How about using a less drastic color, such as orange or yellow?
Author
Owner

@PieterL75 commented on GitHub (Oct 14, 2023):

Maybe a silly proposal, but can a poll be launched in slack on this?
There might be others with the same idea, but the majority is not searching the FRs for these kind of things.
Feedback from the entire community...

I can live with an easy color (light gray for ex) for a disabled interface.
What about the 'enabled but no cable?' Orange would suite

P

@PieterL75 commented on GitHub (Oct 14, 2023): Maybe a silly proposal, but can a poll be launched in slack on this? There might be others with the same idea, but the majority is not searching the FRs for these kind of things. Feedback from the entire community... I can live with an easy color (light gray for ex) for a disabled interface. What about the 'enabled but no cable?' Orange would suite P
Author
Owner

@github-actions[bot] commented on GitHub (Jan 13, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Jan 13, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2024):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Feb 12, 2024): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8366