From 339ad455e4e635080f098cc275f0a1c56937777c Mon Sep 17 00:00:00 2001 From: Matthew Papaleo Date: Fri, 16 Jan 2026 09:03:48 +1100 Subject: [PATCH] Support for max_length and max_depth standardised for prefix_list, aggreate/prefixes and prefix/prefixes --- netbox/templates/ipam/aggregate/prefixes.html | 2 ++ netbox/templates/ipam/inc/max_depth.html | 20 +++++++++++ netbox/templates/ipam/inc/max_length.html | 20 +++++++++++ netbox/templates/ipam/prefix/prefixes.html | 2 ++ netbox/templates/ipam/prefix_list.html | 36 ++----------------- 5 files changed, 46 insertions(+), 34 deletions(-) create mode 100644 netbox/templates/ipam/inc/max_depth.html create mode 100644 netbox/templates/ipam/inc/max_length.html diff --git a/netbox/templates/ipam/aggregate/prefixes.html b/netbox/templates/ipam/aggregate/prefixes.html index c6f769a57..97dbbbe78 100644 --- a/netbox/templates/ipam/aggregate/prefixes.html +++ b/netbox/templates/ipam/aggregate/prefixes.html @@ -3,6 +3,8 @@ {% block extra_controls %} {% include 'ipam/inc/toggle_available.html' %} + {% include 'ipam/inc/max_depth.html' %} + {% include 'ipam/inc/max_length.html' %} {% if perms.ipam.add_prefix and first_available_prefix %} {% trans "Add Prefix" %} diff --git a/netbox/templates/ipam/inc/max_depth.html b/netbox/templates/ipam/inc/max_depth.html new file mode 100644 index 000000000..850e7df54 --- /dev/null +++ b/netbox/templates/ipam/inc/max_depth.html @@ -0,0 +1,20 @@ +{% load i18n %} +{% load helpers %} + + diff --git a/netbox/templates/ipam/inc/max_length.html b/netbox/templates/ipam/inc/max_length.html new file mode 100644 index 000000000..858dd3529 --- /dev/null +++ b/netbox/templates/ipam/inc/max_length.html @@ -0,0 +1,20 @@ +{% load i18n %} +{% load helpers %} + + diff --git a/netbox/templates/ipam/prefix/prefixes.html b/netbox/templates/ipam/prefix/prefixes.html index 3962455a2..4261c3c36 100644 --- a/netbox/templates/ipam/prefix/prefixes.html +++ b/netbox/templates/ipam/prefix/prefixes.html @@ -3,6 +3,8 @@ {% block extra_controls %} {% include 'ipam/inc/toggle_available.html' %} + {% include 'ipam/inc/max_depth.html' %} + {% include 'ipam/inc/max_length.html' %} {% if perms.ipam.add_prefix and first_available_prefix %} {% trans "Add Prefix" %} diff --git a/netbox/templates/ipam/prefix_list.html b/netbox/templates/ipam/prefix_list.html index 5b7103b94..526757b8d 100644 --- a/netbox/templates/ipam/prefix_list.html +++ b/netbox/templates/ipam/prefix_list.html @@ -6,38 +6,6 @@ - - + {% include 'ipam/inc/max_depth.html' %} + {% include 'ipam/inc/max_length.html' %} {% endblock %}