Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PieterL75 opened this issue Aug 20, 2024 · 4 comments · Fixed by #18235
Closed

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

PieterL75 opened this issue Aug 20, 2024 · 4 comments · Fixed by #18235
Assignees
Labels
complexity: low Requires minimal effort to implement netbox status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@PieterL75
Copy link
Contributor

NetBox version

v4.0.9

Feature type

Change to existing functionality

Proposed functionality

This is a revisit of #16075 , as it was closed.

This is revisit of #15379. There @jeremystretch mentioned that the coloring would go away in v4.0, but it seems they are still there, hence my resubmit of this FR

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

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

With the proposed change, this view would become more logic (red = wrong state )
image

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

@PieterL75 PieterL75 added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Aug 20, 2024
@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation and removed status: needs triage This issue is awaiting triage by a maintainer labels Oct 22, 2024
@jeremystretch
Copy link
Member

IMO we should change the color for disabled interfaces from red to gray and leave the rest as-is.

@PieterL75
Copy link
Contributor Author

Sounds like a fair compromise.
As long as the disabled interfaces are no longer red...

We're starting to implement automation, with the status being a real value. And that red is an eyesore.

@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
@PieterL75
Copy link
Contributor Author

I can create a PR for this
"change the color for disabled interfaces from red to gray"

@PieterL75
Copy link
Contributor Author

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation complexity: low Requires minimal effort to implement and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 16, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
complexity: low Requires minimal effort to implement netbox status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants