Add colored badge to IPAddress Family value in detail view #2872

Closed
opened 2025-12-29 18:22:58 +01:00 by adam · 3 comments
Owner

Originally created by @Grokzen on GitHub (Sep 13, 2019).

Environment

  • Python version: 3.7.x
  • NetBox version: 2.6.3

Proposed Functionality

A small cosmetic change to the details page of IPAddress detail view where the family field could be altered to a colored badge to make it easier to spot if the address is a IPv4 or IPv6 address.

Attached example image of how it can look

image

image

Use Case

Adding color to this field makes it easier to spot and recognize what IPAddress family that is set on a IPAddress object. We added this to our internal fork and it was well recieved.

Database Changes

None

External Dependencies

None

Originally created by @Grokzen on GitHub (Sep 13, 2019). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7.x <!-- Example: 3.5.4 --> * NetBox version: 2.6.3 <!-- Example: 2.3.6 --> <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality A small cosmetic change to the details page of IPAddress detail view where the family field could be altered to a colored badge to make it easier to spot if the address is a IPv4 or IPv6 address. Attached example image of how it can look ![image](https://user-images.githubusercontent.com/892309/64859387-61d79680-d62a-11e9-885b-168e3f5a4d59.png) ![image](https://user-images.githubusercontent.com/892309/64859403-6bf99500-d62a-11e9-9ede-166e308eb2fc.png) <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case Adding color to this field makes it easier to spot and recognize what IPAddress family that is set on a IPAddress object. We added this to our internal fork and it was well recieved. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes None <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies None
adam closed this issue 2025-12-29 18:22:58 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 18, 2019):

Honestly this doesn't seem useful IMO. The address family is already immediately apparent just from the format of the address itself.

Also, the built-in context colors are meant to convey certain conditions (green means success, cyan means informational, etc.). We should avoid assigning these to attributes which are not inherently indicative of a particular context.

@jeremystretch commented on GitHub (Sep 18, 2019): Honestly this doesn't seem useful IMO. The address family is already immediately apparent just from the format of the address itself. Also, the built-in context colors are meant to convey certain conditions (green means success, cyan means informational, etc.). We should avoid assigning these to attributes which are not inherently indicative of a particular context.
Author
Owner

@Grokzen commented on GitHub (Sep 23, 2019):

What we noticed was that you had to look at the acctual IPAddress itself above the tabs to determine what it was. Yes IPv4 and IPv6 addresses themself sticks out much more then the small text difference in IPv4 and IPv6. Adding the color makes it much faster to detect and recognize what it is.

I do agree with your point that the built-in colors is not super good in this scenario as they are commonly used to other things. If accepted, yes some slight different colors might have to be chosen to represent this.

@Grokzen commented on GitHub (Sep 23, 2019): What we noticed was that you had to look at the acctual IPAddress itself above the tabs to determine what it was. Yes IPv4 and IPv6 addresses themself sticks out much more then the small text difference in IPv4 and IPv6. Adding the color makes it much faster to detect and recognize what it is. I do agree with your point that the built-in colors is not super good in this scenario as they are commonly used to other things. If accepted, yes some slight different colors might have to be chosen to represent this.
Author
Owner

@jeremystretch commented on GitHub (Dec 13, 2019):

Closing this out as there hasn't been any additional supportive feedback.

@jeremystretch commented on GitHub (Dec 13, 2019): Closing this out as there hasn't been any additional supportive feedback.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2872