Netbox: Add colored badge to IPAddress Family value in detail view

Created on 13 Sep 2019  路  3Comments  路  Source: netbox-community/netbox

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

Most helpful comment

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.

All 3 comments

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benjy44 picture benjy44  路  3Comments

mrfroggg picture mrfroggg  路  3Comments

bellwood picture bellwood  路  4Comments

billyzoellers picture billyzoellers  路  3Comments

anthraxau picture anthraxau  路  4Comments