diff --git a/netbox/templates/dcim/devicerole.html b/netbox/templates/dcim/devicerole.html
index 4db2d3ad8..288101c08 100644
--- a/netbox/templates/dcim/devicerole.html
+++ b/netbox/templates/dcim/devicerole.html
@@ -40,13 +40,7 @@
VM Role |
-
- {% if object.vm_role %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.vm_role %} |
Devices |
diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html
index 21a04e7d0..4b9dc8db7 100644
--- a/netbox/templates/dcim/devicetype.html
+++ b/netbox/templates/dcim/devicetype.html
@@ -33,13 +33,7 @@
Full Depth |
-
- {% if object.is_full_depth %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.is_full_depth %} |
Parent/Child |
diff --git a/netbox/templates/dcim/interface.html b/netbox/templates/dcim/interface.html
index a8b8da5cb..8959379a8 100644
--- a/netbox/templates/dcim/interface.html
+++ b/netbox/templates/dcim/interface.html
@@ -48,23 +48,11 @@
Enabled |
-
- {% if object.enabled %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.enabled %} |
Management Only |
-
- {% if object.mgmt_only %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.mgmt_only %} |
Parent |
diff --git a/netbox/templates/dcim/virtualchassis.html b/netbox/templates/dcim/virtualchassis.html
index eadf1645d..2e1344f71 100644
--- a/netbox/templates/dcim/virtualchassis.html
+++ b/netbox/templates/dcim/virtualchassis.html
@@ -65,7 +65,7 @@
{% if object.master == vc_member %}
-
+ {% checkmark True %}
{% endif %}
|
diff --git a/netbox/templates/extras/customfield.html b/netbox/templates/extras/customfield.html
index bf79059b8..9be7a485a 100644
--- a/netbox/templates/extras/customfield.html
+++ b/netbox/templates/extras/customfield.html
@@ -29,13 +29,7 @@
|
Required |
-
- {% if object.required %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.required %} |
Weight |
diff --git a/netbox/templates/extras/customlink.html b/netbox/templates/extras/customlink.html
index 42b2f6118..ebf50882c 100644
--- a/netbox/templates/extras/customlink.html
+++ b/netbox/templates/extras/customlink.html
@@ -33,13 +33,7 @@
New Window |
-
- {% if object.new_window %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.new_window %} |
diff --git a/netbox/templates/extras/exporttemplate.html b/netbox/templates/extras/exporttemplate.html
index 07b98ee93..912702b86 100644
--- a/netbox/templates/extras/exporttemplate.html
+++ b/netbox/templates/extras/exporttemplate.html
@@ -40,13 +40,7 @@
SSL Verification |
-
- {% if object.ssl_verification %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.ssl_verification %} |
CA File Path |
diff --git a/netbox/templates/generic/object_bulk_import.html b/netbox/templates/generic/object_bulk_import.html
index 2d5957268..26ab2edf2 100644
--- a/netbox/templates/generic/object_bulk_import.html
+++ b/netbox/templates/generic/object_bulk_import.html
@@ -66,7 +66,7 @@
{% if field.required %}
-
+ {% checkmark True true="Required" %}
{% else %}
—
{% endif %}
diff --git a/netbox/templates/inc/panels/custom_fields.html b/netbox/templates/inc/panels/custom_fields.html
index b979cc073..b48a43f1c 100644
--- a/netbox/templates/inc/panels/custom_fields.html
+++ b/netbox/templates/inc/panels/custom_fields.html
@@ -15,9 +15,9 @@
{% if field.type == 'longtext' and value %}
{{ value|render_markdown }}
{% elif field.type == 'boolean' and value == True %}
-
+ {% checkmark value true="True" %}
{% elif field.type == 'boolean' and value == False %}
-
+ {% checkmark value false="False" %}
{% elif field.type == 'url' and value %}
{{ value|truncatechars:70 }}
{% elif field.type == 'json' and value %}
diff --git a/netbox/templates/ipam/prefix.html b/netbox/templates/ipam/prefix.html
index eaea4e1ec..c3d3bdedd 100644
--- a/netbox/templates/ipam/prefix.html
+++ b/netbox/templates/ipam/prefix.html
@@ -4,127 +4,154 @@
{% block content %}
-
-
-
-
-
-
- Family |
- IPv{{ object.family }} |
-
-
- VRF |
-
- {% if object.vrf %}
- {{ object.vrf }} ({{ object.vrf.rd }})
- {% else %}
- Global
- {% endif %}
- |
-
-
- Tenant |
-
- {% if object.tenant %}
- {% if object.tenant.group %}
- {{ object.tenant.group }} /
- {% endif %}
- {{ object.tenant }}
- {% else %}
- None
- {% endif %}
- |
-
-
- Aggregate |
-
- {% if aggregate %}
- {{ aggregate.prefix }} ({{ aggregate.rir }})
- {% else %}
- None
- {% endif %}
- |
-
-
- Site |
-
- {% if object.site %}
- {% if object.site.region %}
- {{ object.site.region }} /
- {% endif %}
- {{ object.site }}
- {% else %}
- None
- {% endif %}
- |
-
-
- VLAN |
-
- {% if object.vlan %}
- {% if object.vlan.group %}
- {{ object.vlan.group }} /
- {% endif %}
- {{ object.vlan }}
- {% else %}
- None
- {% endif %}
- |
-
-
- Status |
-
- {{ object.get_status_display }}
- |
-
-
- Role |
-
- {% if object.role %}
- {{ object.role }}
- {% else %}
- None
- {% endif %}
- |
-
-
- Description |
- {{ object.description|placeholder }} |
-
-
- Is a pool |
-
- {% if object.is_pool %}
-
- {% else %}
-
- {% endif %}
- |
-
-
- Utilization |
-
- {% if object.mark_utilized %}
- {% utilization_graph 100 warning_threshold=0 danger_threshold=0 %}
- (Marked fully utilized)
- {% else %}
- {% utilization_graph object.get_utilization %}
- {% endif %}
- |
-
-
-
-
- {% plugin_left_page object %}
+
+
+
+
+
+
+ Family |
+ IPv{{ object.family }} |
+
+
+ VRF |
+
+ {% if object.vrf %}
+ {{ object.vrf }} ({{ object.vrf.rd }})
+ {% else %}
+ Global
+ {% endif %}
+ |
+
+
+ Tenant |
+
+ {% if object.tenant %}
+ {% if object.tenant.group %}
+ {{ object.tenant.group }} /
+ {% endif %}
+ {{ object.tenant }}
+ {% else %}
+ None
+ {% endif %}
+ |
+
+
+ Aggregate |
+
+ {% if aggregate %}
+ {{ aggregate.prefix }} ({{ aggregate.rir }})
+ {% else %}
+ None
+ {% endif %}
+ |
+
+
+ Site |
+
+ {% if object.site %}
+ {% if object.site.region %}
+ {{ object.site.region }} /
+ {% endif %}
+ {{ object.site }}
+ {% else %}
+ None
+ {% endif %}
+ |
+
+
+ VLAN |
+
+ {% if object.vlan %}
+ {% if object.vlan.group %}
+ {{ object.vlan.group }} /
+ {% endif %}
+ {{ object.vlan }}
+ {% else %}
+ None
+ {% endif %}
+ |
+
+
+ Status |
+
+ {{ object.get_status_display }}
+ |
+
+
+ Role |
+
+ {% if object.role %}
+ {{ object.role }}
+ {% else %}
+ None
+ {% endif %}
+ |
+
+
+ Description |
+ {{ object.description|placeholder }} |
+
+
+ Is a pool |
+ {% checkmark object.is_pool %} |
+
+
+
-
- {% include 'inc/panels/custom_fields.html' %}
- {% include 'inc/panels/tags.html' %}
- {% plugin_right_page object %}
+ {% plugin_left_page object %}
+
+
+
+
+
+
+
+ Utilization |
+
+ {% if object.mark_utilized %}
+ {% utilization_graph 100 warning_threshold=0 danger_threshold=0 %}
+ (Marked fully utilized)
+ {% else %}
+ {% utilization_graph object.get_utilization %}
+ {% endif %}
+ |
+
+ {% with child_ip_count=object.get_child_ips.count %}
+
+ Child IPs |
+
+ {{ child_ip_count }}
+ |
+
+
+ Available IPs |
+ {{ object.get_available_ips|length }} |
+
+ {% endwith %}
+
+ First available IP |
+
+ {% with first_available_ip=object.get_first_available_ip %}
+ {% if first_available_ip %}
+ {% if perms.ipam.add_ipaddress %}
+ {{ first_available_ip }}
+ {% else %}
+ {{ first_available_ip }}
+ {% endif %}
+ {% else %}
+ None
+ {% endif %}
+ {% endwith %}
+ |
+
+
+
+ {% include 'inc/panels/custom_fields.html' %}
+ {% include 'inc/panels/tags.html' %}
+ {% plugin_right_page object %}
+
diff --git a/netbox/templates/ipam/rir.html b/netbox/templates/ipam/rir.html
index 0c38855b5..555fed1de 100644
--- a/netbox/templates/ipam/rir.html
+++ b/netbox/templates/ipam/rir.html
@@ -30,13 +30,7 @@
|
Private |
-
- {% if object.is_private %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.is_private %} |
Aggregates |
diff --git a/netbox/templates/ipam/vrf.html b/netbox/templates/ipam/vrf.html
index 349fe20d3..ae4f65887 100644
--- a/netbox/templates/ipam/vrf.html
+++ b/netbox/templates/ipam/vrf.html
@@ -30,13 +30,7 @@
Unique IP Space |
-
- {% if object.enforce_unique %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark object.enforce_unique %} |
Description |
diff --git a/netbox/templates/users/api_tokens.html b/netbox/templates/users/api_tokens.html
index 48fe01c1c..01ffec23a 100644
--- a/netbox/templates/users/api_tokens.html
+++ b/netbox/templates/users/api_tokens.html
@@ -5,7 +5,7 @@
{% block content %}
-
+
{% for token in tokens %}
{% empty %}
-
You do not have any API tokens.
+
You do not have any API tokens.
+
Tokens are used to authenticate REST and GraphQL API requests.
{% endfor %}
Superuser |
-
- {% if request.user.is_superuser %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark request.user.is_superuser %} |
Admin Access |
-
- {% if request.user.is_staff %}
-
- {% else %}
-
- {% endif %}
- |
+ {% checkmark request.user.is_staff %} |
diff --git a/netbox/tenancy/forms/filtersets.py b/netbox/tenancy/forms/filtersets.py
index b08a33fa6..7849e2171 100644
--- a/netbox/tenancy/forms/filtersets.py
+++ b/netbox/tenancy/forms/filtersets.py
@@ -22,8 +22,7 @@ class TenantGroupFilterForm(CustomFieldModelFilterForm):
parent_id = DynamicModelMultipleChoiceField(
queryset=TenantGroup.objects.all(),
required=False,
- label=_('Parent group'),
- fetch_trigger='open'
+ label=_('Parent group')
)
tag = TagFilterField(model)
@@ -38,8 +37,7 @@ class TenantFilterForm(CustomFieldModelFilterForm):
queryset=TenantGroup.objects.all(),
required=False,
null_option='None',
- label=_('Group'),
- fetch_trigger='open'
+ label=_('Group')
)
tag = TagFilterField(model)
@@ -53,8 +51,7 @@ class ContactGroupFilterForm(CustomFieldModelFilterForm):
parent_id = DynamicModelMultipleChoiceField(
queryset=ContactGroup.objects.all(),
required=False,
- label=_('Parent group'),
- fetch_trigger='open'
+ label=_('Parent group')
)
tag = TagFilterField(model)
@@ -74,7 +71,6 @@ class ContactFilterForm(CustomFieldModelFilterForm):
queryset=ContactGroup.objects.all(),
required=False,
null_option='None',
- label=_('Group'),
- fetch_trigger='open'
+ label=_('Group')
)
tag = TagFilterField(model)
diff --git a/netbox/tenancy/forms/forms.py b/netbox/tenancy/forms/forms.py
index cad63c1a6..9a3d00e05 100644
--- a/netbox/tenancy/forms/forms.py
+++ b/netbox/tenancy/forms/forms.py
@@ -33,8 +33,7 @@ class TenancyFilterForm(forms.Form):
queryset=TenantGroup.objects.all(),
required=False,
null_option='None',
- label=_('Tenant group'),
- fetch_trigger='open'
+ label=_('Tenant group')
)
tenant_id = DynamicModelMultipleChoiceField(
queryset=Tenant.objects.all(),
@@ -43,6 +42,5 @@ class TenancyFilterForm(forms.Form):
query_params={
'group_id': '$tenant_group_id'
},
- label=_('Tenant'),
- fetch_trigger='open'
+ label=_('Tenant')
)
diff --git a/netbox/utilities/forms/fields.py b/netbox/utilities/forms/fields.py
index 0e1b42b28..f7bd32792 100644
--- a/netbox/utilities/forms/fields.py
+++ b/netbox/utilities/forms/fields.py
@@ -395,8 +395,8 @@ class DynamicModelChoiceMixin:
filter = django_filters.ModelChoiceFilter
widget = widgets.APISelect
- def __init__(self, query_params=None, initial_params=None, null_option=None, disabled_indicator=None, fetch_trigger=None,
- empty_label=None, *args, **kwargs):
+ def __init__(self, query_params=None, initial_params=None, null_option=None, disabled_indicator=None,
+ fetch_trigger=None, empty_label=None, *args, **kwargs):
self.query_params = query_params or {}
self.initial_params = initial_params or {}
self.null_option = null_option
diff --git a/netbox/utilities/templates/helpers/checkmark.html b/netbox/utilities/templates/helpers/checkmark.html
new file mode 100644
index 000000000..e4eacae01
--- /dev/null
+++ b/netbox/utilities/templates/helpers/checkmark.html
@@ -0,0 +1,5 @@
+{% if value %}
+