diff --git a/netbox/templates/vpn/tunnel.html b/netbox/templates/vpn/tunnel.html index 2420a1230..2d9274ad9 100644 --- a/netbox/templates/vpn/tunnel.html +++ b/netbox/templates/vpn/tunnel.html @@ -3,6 +3,14 @@ {% load plugins %} {% load i18n %} +{% block extra_controls %} + {% if perms.vpn.add_tunneltermination %} + + {% trans "Add Termination" %} + + {% endif %} +{% endblock %} + {% block content %}
diff --git a/netbox/vpn/models/tunnels.py b/netbox/vpn/models/tunnels.py index 6603de87c..377f39706 100644 --- a/netbox/vpn/models/tunnels.py +++ b/netbox/vpn/models/tunnels.py @@ -103,6 +103,10 @@ class TunnelTermination(CustomFieldsMixin, CustomLinksMixin, TagsMixin, ChangeLo null=True ) + prerequisite_models = ( + 'vpn.Tunnel', + ) + class Meta: ordering = ('tunnel', 'role', 'pk') constraints = ( diff --git a/netbox/vpn/tables.py b/netbox/vpn/tables.py index 23a1481fb..5e7d187c6 100644 --- a/netbox/vpn/tables.py +++ b/netbox/vpn/tables.py @@ -213,7 +213,7 @@ class IPSecPolicyTable(NetBoxTable): class Meta(NetBoxTable.Meta): model = IPSecPolicy fields = ( - 'pk', 'id', 'name', 'proposals', 'pfs_group', 'tags', 'created', 'last_updated', + 'pk', 'id', 'name', 'proposals', 'pfs_group', 'description', 'tags', 'created', 'last_updated', ) default_columns = ( 'pk', 'name', 'proposals', 'pfs_group', 'description',