Skip to content
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

Set default color for device and rack roles #4672

Closed
jkldgoefgkljefogeg opened this issue May 21, 2020 · 4 comments
Closed

Set default color for device and rack roles #4672

jkldgoefgkljefogeg opened this issue May 21, 2020 · 4 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@jkldgoefgkljefogeg
Copy link

jkldgoefgkljefogeg commented May 21, 2020

Environment

  • Python version: python:3.7
  • NetBox version: 2.8.4

Proposed Functionality

when adding a device role, color is currently a mandatory field. I propose making this field optional and auto assign an unused color if none specified

Use Case

When there are many device roles, it is difficult to pick a unique color.

Database Changes

N/A

External Dependencies

N/A

@jeremystretch
Copy link
Member

The field must remain mandatory. What we can do is set a (non-configurable) default color, but NetBox will not assign colors randomly.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label May 21, 2020
@jkldgoefgkljefogeg
Copy link
Author

That works too.
Just curious what is the history with device role label/color, I suspect some don't know what this is useful for

@czarnian
Copy link

Default color sounds good. Making it configurable in UserPreferences would cease discussion about what color to use.

@jeremystretch
Copy link
Member

@czarnian we won't make it configurable, foremost because it would lead to a nondeterministic condition when creating a role via the REST API with an unspecified color.

@jeremystretch jeremystretch removed the status: under review Further discussion is needed to determine this issue's scope and/or implementation label May 26, 2020
@jeremystretch jeremystretch self-assigned this May 26, 2020
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels May 26, 2020
@jeremystretch jeremystretch changed the title auto assign color for device-roles Set default color for device and rack roles May 26, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants