Open llamafilm opened 10 months ago
At first glance, it seems like all that is required is adding these lines in netbox/templates/dcim/device/base.html
{% if object.location %}
<li class="breadcrumb-item"><a href="{% url 'dcim:device_list' %}?site_id={{ object.site.pk }}&location_id={{ object.location.pk }}">{{ object.location }}</a></li>
{% endif %}
As Locations can be nested, I would assume that the full hierarchy would be desirable, so the code would be a little more complicated. It looks like it's already being done on MPTT views themselves, like Location, Region, and Site Group, so it would probably make sense to make a template tag like the existing nested_tree one to handle this use case.
You're right, the full hierarchy would be better. I guess there would need to be some limit in case the string is too long, shortening the middle with ellipses to fit on screen.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
NetBox version
v3.7.0
Feature type
Change to existing functionality
Proposed functionality
When viewing a device, the breadcrumbs at the top of the page currently show the site and parent device. I'd like to also include the location here. Mockup image:
Use case
My devices are primarily organized using the hierarchy Site > Location > Device. This would save a lot of time when editing a device, to be able to quickly jump to a list of other devices in the same location. (By the way, location means room name in my system).
Database changes
none
External dependencies
none