Display the Device name when editing an Interface #4024

Closed
opened 2025-12-29 18:32:40 +01:00 by adam · 3 comments
Owner

Originally created by @tristanbob on GitHub (Aug 24, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: Unknown
  • NetBox version: 2.9.0

Proposed Functionality

Display the relevant Device name when Editing an Interface.
https://netbox.mydomain.com/dcim/interfaces/1389/edit/

Use Case

When editing an Interface, there is no way to know which Device you are editing. I started making changes to an Interface, but then started worrying that I was editing the wrong device. I had to go back to verify and start over.

Database Changes

None.

External Dependencies

None.

Originally created by @tristanbob on GitHub (Aug 24, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: Unknown * NetBox version: 2.9.0 ### Proposed Functionality Display the relevant Device name when Editing an Interface. https://netbox.mydomain.com/dcim/interfaces/1389/edit/ ### Use Case When editing an Interface, there is no way to know which Device you are editing. I started making changes to an Interface, but then started worrying that I was editing the wrong device. I had to go back to verify and start over. ### Database Changes None. ### External Dependencies None.
adam added the status: acceptedtype: feature labels 2025-12-29 18:32:40 +01:00
adam closed this issue 2025-12-29 18:32:40 +01:00
Author
Owner

@DanSheps commented on GitHub (Aug 25, 2020):

Are you willing to take this on @tristanbob?

@DanSheps commented on GitHub (Aug 25, 2020): Are you willing to take this on @tristanbob?
Author
Owner

@tristanbob commented on GitHub (Aug 25, 2020):

I spent about 1 hour looking into this, which was enough time to know that it would take me tens of hours to make this minor change. (I have very basic programming skills, and no experience with Django).

It looks like the change would involve editing "netbox/templates/dcim/interface_edit.html", but I'm not certain what else might need to be changed.

Do you think editing an interface should use the same format as editing a Tenant? It has a separate table to show the name of the Tenant and the Group it belongs to. This table could be used to show the Interface and the Device it belongs to.

@tristanbob commented on GitHub (Aug 25, 2020): I spent about 1 hour looking into this, which was enough time to know that it would take me tens of hours to make this minor change. (I have very basic programming skills, and no experience with Django). It looks like the change would involve editing "netbox/templates/dcim/interface_edit.html", but I'm not certain what else might need to be changed. Do you think editing an interface should use the same format as editing a Tenant? It has a separate table to show the name of the Tenant and the Group it belongs to. This table could be used to show the Interface and the Device it belongs to.
Author
Owner

@bcohee commented on GitHub (Sep 1, 2020):

Inline style to add the device name to the would be to check if the obj_type is type interface and add a { obj.device } to the panel title here - https://github.com/netbox-community/netbox/blob/develop/netbox/templates/utilities/obj_edit.html#L19

I do not know the django / model syntax to do so though.

or quick and ugly could add <h3>{% block title %}Device {{ interface.device }}{% endblock %}</h3> to the top line of https://github.com/netbox-community/netbox/blob/develop/netbox/templates/dcim/interface_edit.html

@bcohee commented on GitHub (Sep 1, 2020): Inline style to add the device name to the would be to check if the obj_type is type interface and add a { obj.device } to the panel title here - https://github.com/netbox-community/netbox/blob/develop/netbox/templates/utilities/obj_edit.html#L19 I do not know the django / model syntax to do so though. or quick and ugly could add `<h3>{% block title %}Device {{ interface.device }}{% endblock %}</h3>` to the top line of https://github.com/netbox-community/netbox/blob/develop/netbox/templates/dcim/interface_edit.html
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4024