Add Virtual Chassis name to pane on Device View #11032

Closed
opened 2025-12-29 21:39:23 +01:00 by adam · 1 comment
Owner

Originally created by @cmcknz77 on GitHub (Apr 15, 2025).

Originally assigned to: @renatoalmeidaoliveira on GitHub.

NetBox version

v4.2.6

Feature type

Change to existing functionality

Proposed functionality

I propose an amendment to the device view template

Image

to add {{ object.virtual_chassis.name }} to the prefetch list and add the following to the h2 Header for the Virtual Chassis section:

Image

Here's what it might look like (although I've had to redact some info):

Image

{% if vc_members %}
                <div class="card">
                    <h2 class="card-header">
                      {% trans "Virtual Chassis" %}: {{ object.virtual_chassis.name }}
                      <div class="card-actions">
                        <a href="{{ object.virtual_chassis.get_absolute_url }}" class="btn btn-ghost-primary btn-sm">
                          <span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> {% trans "View Virtual Chassis" %}
                        </a>
                      </div>
                    </h2>

Use case

I work with a number of Virtual Chassis in my environment and in a lot of cases the member Device Name does not have a direct relationship with the name of the Virtual Chassis that device is a member of to help make the device easily identifiable.

It would be really handy if when a device is a member of a Virtual Chassis, the name of that Virtual Chassis is visible on the device page.

For example in your demo environment the Camden site is connected with 2 SDWAN Redundant devices operating as a single SDWAN Edge with name "NACamdenEdge-VC".

Image
But when you click on the devices themselves there's no way to tell which Edge device it's a member of:

Image

Database changes

None required - this is a purely cosmetic change.

External dependencies

No response

Originally created by @cmcknz77 on GitHub (Apr 15, 2025). Originally assigned to: @renatoalmeidaoliveira on GitHub. ### NetBox version v4.2.6 ### Feature type Change to existing functionality ### Proposed functionality I propose an amendment to the [device view template](https://github.com/netbox-community/netbox/blob/main/netbox/templates/dcim/device.html) ![Image](https://github.com/user-attachments/assets/3d359590-e8e0-4c64-9764-7d5030aa703e) to add `{{ object.virtual_chassis.name }}` to the prefetch list and add the following to the h2 Header for the Virtual Chassis section: ![Image](https://github.com/user-attachments/assets/1e222153-5585-4621-a9a7-549d5e5d551b) Here's what it might look like (although I've had to redact some info): ![Image](https://github.com/user-attachments/assets/33e9b235-70e6-4d7e-8da1-f99048c80272) ```html {% if vc_members %} <div class="card"> <h2 class="card-header"> {% trans "Virtual Chassis" %}: {{ object.virtual_chassis.name }} <div class="card-actions"> <a href="{{ object.virtual_chassis.get_absolute_url }}" class="btn btn-ghost-primary btn-sm"> <span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> {% trans "View Virtual Chassis" %} </a> </div> </h2> ``` ### Use case I work with a number of Virtual Chassis in my environment and in a lot of cases the member Device Name does not have a direct relationship with the name of the Virtual Chassis that device is a member of to help make the device easily identifiable. It would be really handy if when a device is a member of a Virtual Chassis, the name of that Virtual Chassis is visible on the device page. For example in your demo environment the Camden site is connected with 2 SDWAN Redundant devices operating as a single SDWAN Edge with name "NACamdenEdge-VC". ![Image](https://github.com/user-attachments/assets/8af0f079-deb8-4b0b-aab7-b274159696b8) But when you click on the devices themselves there's no way to tell which Edge device it's a member of: ![Image](https://github.com/user-attachments/assets/2cc9f3de-4723-4a02-89f0-64929165d106) ### Database changes None required - this is a purely cosmetic change. ### External dependencies _No response_
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:39:23 +01:00
adam closed this issue 2025-12-29 21:39:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 28, 2025):

Let's use parentheses instead of a colon to be more consistent with other areas of the UI.

@jeremystretch commented on GitHub (Apr 28, 2025): Let's use parentheses instead of a colon to be more consistent with other areas of the UI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11032