Filter interfaces to device only when adding new IP #9757

Closed
opened 2025-12-29 21:22:10 +01:00 by adam · 4 comments
Owner

Originally created by @PieterL75 on GitHub (May 28, 2024).

NetBox version

v4.0.3

Feature type

Data model extension

Proposed functionality

When adding an IP to an interface, the edit form shows all possible interfaces available, and not only those from the device where the IP is added to.
This was addressed in #13293, but only works when editing an existing IP

step:
create an IP
create a device with interfaces
on the device/interface list, click the blue '+ IP Address'

Check the dropdown for the assigned interfaces. That one shows all interfaces available
image

Use case

Same as in #13293 : reduce effort when adding IPs to a device.
When a wrong interface was selected and noticed in the AddIP form, then changing the interface will be more straightforward

Database changes

No response

External dependencies

No response

Originally created by @PieterL75 on GitHub (May 28, 2024). ### NetBox version v4.0.3 ### Feature type Data model extension ### Proposed functionality When adding an IP to an interface, the edit form shows all possible interfaces available, and not only those from the device where the IP is added to. This was addressed in #13293, but only works when editing an existing IP step: create an IP create a device with interfaces on the device/interface list, click the blue '+ IP Address' Check the dropdown for the assigned interfaces. That one shows all interfaces available ![image](https://github.com/netbox-community/netbox/assets/74899468/2d1716a9-8afc-4a48-84b5-1dde5dcb0abf) ### Use case Same as in #13293 : reduce effort when adding IPs to a device. When a wrong interface was selected and noticed in the AddIP form, then changing the interface will be more straightforward ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: under review labels 2025-12-29 21:22:10 +01:00
adam closed this issue 2025-12-29 21:22:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 29, 2024):

When adding an IP to an interface, the edit form shows all possible interfaces available, and not only those from the device where the IP is added to.

Why would it be necessary to limit the list of interfaces? The field is already pre-populated with the original interface, and it's perfectly acceptable for the user to change it to an interface on a different device. (We include the advanced selector button on this field for this purpose.)

@jeremystretch commented on GitHub (May 29, 2024): > When adding an IP to an interface, the edit form shows all possible interfaces available, and not only those from the device where the IP is added to. Why would it be necessary to limit the list of interfaces? The field is already pre-populated with the original interface, and it's perfectly acceptable for the user to change it to an interface on a different device. (We include the advanced selector button on this field for this purpose.)
Author
Owner

@PieterL75 commented on GitHub (May 29, 2024):

Because you start of a device, and it makes sense to show only the device's interfaces, and not all the rest.
If you just create an IP, then I agree that it should show any interface, and that AdvancedSelector could be used.

If you by accident used the wrong interface on a device to add an IP, then it is again a click-click to get to the right interface.
This would also make the user experience the same for adding or updating an IP, when starting from a device

@PieterL75 commented on GitHub (May 29, 2024): Because you start of a device, and it makes sense to show only the device's interfaces, and not all the rest. If you just create an IP, then I agree that it should show any interface, and that AdvancedSelector could be used. If you by accident used the wrong interface on a device to add an IP, then it is again a click-click to get to the right interface. This would also make the user experience the same for adding or updating an IP, when starting from a device
Author
Owner

@github-actions[bot] commented on GitHub (Aug 28, 2024):

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.

@github-actions[bot] commented on GitHub (Aug 28, 2024): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Sep 28, 2024):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Sep 28, 2024): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9757