Should devices in rack elevation use device.display_name property? #1740

Closed
opened 2025-12-29 16:34:53 +01:00 by adam · 1 comment
Owner

Originally created by @nickzxcv on GitHub (May 23, 2018).

Issue type

[ X ] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.3.3

Description

The rack elevations template shows the device role name of an unnamed device. It seems that since the time that code was written, the device.display_name property has been created to work in a similar way but also check if first if the device is a member of a virtual chassis and in that case show the virtual chassis master device name and the member id of the unnamed member device.

It seems like using device.display_name in the template could better show how an unnamed device in a rack is in fact related to some other significant devices. Since device.display_name has a different default though (the device type name instead of role name) changing to use device.display_name would mean a change in how all unnamed devices are shown in the rack elevation.

Does it make sense to do that? Is the display_name property right to use there or is better to keep defaulting to the role name in the rack elevation?

Originally created by @nickzxcv on GitHub (May 23, 2018). ### Issue type [ X ] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.3.3 ### Description The rack elevations template shows the device role name of an unnamed device. It seems that since the time that code was written, the device.display_name property has been created to work in a similar way but also check if first if the device is a member of a virtual chassis and in that case show the virtual chassis master device name and the member id of the unnamed member device. It seems like using device.display_name in the template could better show how an unnamed device in a rack is in fact related to some other significant devices. Since device.display_name has a different default though (the device type name instead of role name) changing to use device.display_name would mean a change in how all unnamed devices are shown in the rack elevation. Does it make sense to do that? Is the display_name property right to use there or is better to keep defaulting to the role name in the rack elevation?
adam closed this issue 2025-12-29 16:34:54 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 18, 2018):

display_name will return (in order):

  1. Device name
  2. Virtual chassis master name
  3. Device type

I think it makes sense to stick with the role in the rack elevation.

@jeremystretch commented on GitHub (Jul 18, 2018): `display_name` will return (in order): 1. Device name 2. Virtual chassis master name 3. Device type I think it makes sense to stick with the role in the rack elevation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1740