netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.77k stars 2.54k forks source link

Customize RackView labels #14205

Open PieterL75 opened 10 months ago

PieterL75 commented 10 months ago

NetBox version

v3.6.4

Feature type

Change to existing functionality

Proposed functionality

The rack elevation views currently only show either the 'label' and/or the images of a device. I would to make that 'label' and 'postcard' customizable, using jinja2 templates. This way the 'label' and 'postcard' can show information relevant to the engineer working on the racks

The custom templates can be stored in a new 'Customization' item 'Rack Labels' a rack-label item consists of the template for the device label and a template for the postcard

the rack view gets a new dropdown where the Custom Labels can be choosen: image

Optional : Is there a mechanism that can store the last used label in a users' preferences ? So that he gets the same racklabels the next time he opens the elevation

This FR is an update of https://github.com/netbox-community/netbox/issues/12518

Use case

Our DC Eng needs to work with 'asset_tags' in stead of hostnames to identify devices. Now he has to either hover over a device, or click on it to see the asset tags. When doing their regular rack inventory, this is very time consuming. With the alternate view, they can set the asset_tag as label. When doing a power-audit, the label could be replaced with the 'allocated and maximum draw'

The postcard currently contains some info, but I can imaging that some people would like to see other info in there.

Database changes

New table 'Rack Labels' Fields:

External dependencies

No response

PieterL75 commented 8 months ago

Other use cases that can bring a pre-rack overview directly visible. Each with its own label and postcard

AirDRoN-lab commented 5 months ago

Hello. It would be extremely useful if the jinja2 templates could be applied to the pop-up bubble. All devices at our sites are registered with a VNF/CNF tag with reasonable length and custom field, which would like to see in pop-up (and/or label).

llamafilm commented 1 month ago

Adding another use case for this: I have lots of non-rackable devices which I model as children. I use a Generic 1U Shelf parent with 2 or 3 device bays. I'd like to use the shelf's description field to describe what it contains in the rack elevation view. Jinja templates would allow me to customize this only for devices which have children.

image