Disable "Add termination" button for P2P L2VPNs which already have 2 terminations #6817

Closed
opened 2025-12-29 19:45:45 +01:00 by adam · 1 comment
Owner

Originally created by @candlerb on GitHub (Aug 16, 2022).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.3-beta2

Feature type

Change to existing functionality

Proposed functionality

Netbox enforces at model level that a P2P L2VPN can only have two terminations.

However in the GUI, if you are viewing a P2P L2VPN e.g. /ipam/l2vpns/1/, and it already has 2 terminations, then clicking "Add Termination" still takes you to the Add Termination page, allowing you to fill in termination information. It's only when you try to save it that you're told you can't have more than 2 terminations.

I propose that either you should get an error immediately on clicking the Add Termination button, or that the button should be greyed out (with a tooltip saying that you cannot have more than 2 terminations on a P2P L2VPN)

Use case

User experience: not prompting the user to enter data which you know in advance will be rejected.

Database changes

None

External dependencies

None

Originally created by @candlerb on GitHub (Aug 16, 2022). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.3-beta2 ### Feature type Change to existing functionality ### Proposed functionality Netbox enforces at model level that a P2P L2VPN can only have two terminations. However in the GUI, if you are viewing a P2P L2VPN e.g. `/ipam/l2vpns/1/`, and it already has 2 terminations, then clicking "Add Termination" still takes you to the Add Termination page, allowing you to fill in termination information. It's only when you try to save it that you're told you can't have more than 2 terminations. I propose that either you should get an error immediately on clicking the Add Termination button, or that the button should be greyed out (with a tooltip saying that you cannot have more than 2 terminations on a P2P L2VPN) ### Use case User experience: not prompting the user to enter data which you know in advance will be rejected. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 19:45:45 +01:00
adam closed this issue 2025-12-29 19:45:45 +01:00
Author
Owner

@candlerb commented on GitHub (Aug 16, 2022):

Ref discussion: https://github.com/netbox-community/netbox/discussions/9727#discussioncomment-3409332

@candlerb commented on GitHub (Aug 16, 2022): Ref discussion: https://github.com/netbox-community/netbox/discussions/9727#discussioncomment-3409332
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6817