diff --git a/docs/customization/custom-links.md b/docs/customization/custom-links.md deleted file mode 100644 index 1ee366cfd..000000000 --- a/docs/customization/custom-links.md +++ /dev/null @@ -1 +0,0 @@ -{!models/extras/customlink.md!} diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index 2207c6951..3d8a52d77 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -2,6 +2,11 @@ ## v3.0.8 (FUTURE) +### Enhancements + +* [#7551](https://github.com/netbox-community/netbox/issues/7551) - Add UI field to filter interfaces by kind +* [#7561](https://github.com/netbox-community/netbox/issues/7561) - Add a utilization column to the IP ranges table + ### Bug Fixes * [#7300](https://github.com/netbox-community/netbox/issues/7300) - Fix incorrect Device LLDP interface row coloring @@ -10,7 +15,10 @@ * [#7534](https://github.com/netbox-community/netbox/issues/7534) - Avoid exception when utilizing "create and add another" twice in succession * [#7544](https://github.com/netbox-community/netbox/issues/7544) - Fix multi-value filtering of custom field objects * [#7545](https://github.com/netbox-community/netbox/issues/7545) - Fix incorrect display of update/delete events for webhooks +* [#7550](https://github.com/netbox-community/netbox/issues/7550) - Fix rendering of UTF8-encoded data in change records +* [#7556](https://github.com/netbox-community/netbox/issues/7556) - Fix display of version when new release is available * [#7564](https://github.com/netbox-community/netbox/issues/7564) - Fix VC position zero at VC creation and VC position zero not being displayed +* [#7584](https://github.com/netbox-community/netbox/issues/7584) - Fix alignment of object identifier under object view --- diff --git a/mkdocs.yml b/mkdocs.yml index 7244c36d6..d12ef734f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -65,7 +65,7 @@ nav: - Customization: - Custom Fields: 'customization/custom-fields.md' - Custom Validation: 'customization/custom-validation.md' - - Custom Links: 'customization/custom-links.md' + - Custom Links: 'models/extras/customlink.md' - Export Templates: 'customization/export-templates.md' - Custom Scripts: 'customization/custom-scripts.md' - Reports: 'customization/reports.md' diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index acea294f8..2f6228751 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -685,6 +685,18 @@ class PowerOutletFeedLegChoices(ChoiceSet): # Interfaces # +class InterfaceKindChoices(ChoiceSet): + KIND_PHYSICAL = 'physical' + KIND_VIRTUAL = 'virtual' + KIND_WIRELESS = 'wireless' + + CHOICES = ( + (KIND_PHYSICAL, 'Physical'), + (KIND_VIRTUAL, 'Virtual'), + (KIND_WIRELESS, 'Wireless'), + ) + + class InterfaceTypeChoices(ChoiceSet): # Virtual diff --git a/netbox/dcim/forms/filtersets.py b/netbox/dcim/forms/filtersets.py index 95ff9aa3d..4ef53c469 100644 --- a/netbox/dcim/forms/filtersets.py +++ b/netbox/dcim/forms/filtersets.py @@ -957,9 +957,14 @@ class InterfaceFilterForm(DeviceComponentFilterForm): model = Interface field_groups = [ ['q', 'tag'], - ['name', 'label', 'type', 'enabled', 'mgmt_only', 'mac_address'], + ['name', 'label', 'kind', 'type', 'enabled', 'mgmt_only', 'mac_address'], ['region_id', 'site_group_id', 'site_id', 'location_id', 'device_id'], ] + kind = forms.MultipleChoiceField( + choices=InterfaceKindChoices, + required=False, + widget=StaticSelectMultiple() + ) type = forms.MultipleChoiceField( choices=InterfaceTypeChoices, required=False, diff --git a/netbox/ipam/tables/ip.py b/netbox/ipam/tables/ip.py index 485e4a123..ddad6c573 100644 --- a/netbox/ipam/tables/ip.py +++ b/netbox/ipam/tables/ip.py @@ -260,11 +260,16 @@ class IPRangeTable(BaseTable): linkify=True ) tenant = TenantColumn() + utilization = UtilizationColumn( + accessor='utilization', + orderable=False + ) class Meta(BaseTable.Meta): model = IPRange fields = ( 'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description', + 'utilization', ) default_columns = ( 'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description', diff --git a/netbox/netbox/views/__init__.py b/netbox/netbox/views/__init__.py index 3568204fe..2c033e760 100644 --- a/netbox/netbox/views/__init__.py +++ b/netbox/netbox/views/__init__.py @@ -137,7 +137,7 @@ class HomeView(View): release_version, release_url = latest_release if release_version > version.parse(settings.VERSION): new_release = { - 'version': str(latest_release), + 'version': str(release_version), 'url': release_url, } diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index b7bc12446..e8d72810e 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -130,12 +130,12 @@
{% if object.postchange_data %} -
{% for k, v in object.postchange_data.items %}{% spaceless %}
-                    {{ k }}: {{ v|render_json }}
-                    {% endspaceless %}{% endfor %}
-                
+
{% for k, v in object.postchange_data.items %}{% spaceless %}
+                        {{ k }}: {{ v|render_json }}
+                        {% endspaceless %}{% endfor %}
+                    
{% else %} - None + None {% endif %}
diff --git a/netbox/templates/generic/object.html b/netbox/templates/generic/object.html index 24285846f..40c0e09ce 100644 --- a/netbox/templates/generic/object.html +++ b/netbox/templates/generic/object.html @@ -6,9 +6,17 @@ {% load plugins %} {% block header %} - {# Breadcrumbs #} - + {{ block.super }} {% endblock %} diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index d6e830928..3af1aa960 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -58,7 +58,7 @@ def render_json(value): """ Render a dictionary as formatted JSON. """ - return json.dumps(value, indent=4, sort_keys=True) + return json.dumps(value, ensure_ascii=False, indent=4, sort_keys=True) @register.filter()