From 031876964f73f9cd6c806fc6353186b501a10c2c Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 8 Oct 2021 13:42:43 -0400 Subject: [PATCH 1/3] #2102: Implement q search filter for device type components --- netbox/dcim/filtersets.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/netbox/dcim/filtersets.py b/netbox/dcim/filtersets.py index 6f2c23c90..df7f415e2 100644 --- a/netbox/dcim/filtersets.py +++ b/netbox/dcim/filtersets.py @@ -480,12 +480,21 @@ class DeviceTypeFilterSet(PrimaryModelFilterSet): class DeviceTypeComponentFilterSet(django_filters.FilterSet): + q = django_filters.CharFilter( + method='search', + label='Search', + ) devicetype_id = django_filters.ModelMultipleChoiceFilter( queryset=DeviceType.objects.all(), field_name='device_type_id', label='Device type (ID)', ) + def search(self, queryset, name, value): + if not value.strip(): + return queryset + return queryset.filter(name__icontains=value) + class ConsolePortTemplateFilterSet(ChangeLoggedModelFilterSet, DeviceTypeComponentFilterSet): From d66fc8f661c4bdcbf1ee61323e8393a995afcdc8 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 8 Oct 2021 13:49:15 -0400 Subject: [PATCH 2/3] Release v3.0.7 --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- docs/release-notes/version-3.0.md | 2 +- netbox/netbox/settings.py | 2 +- requirements.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 7b54d9248..2a1ecd5d0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -17,7 +17,7 @@ body: What version of NetBox are you currently running? (If you don't have access to the most recent NetBox release, consider testing on our [demo instance](https://demo.netbox.dev/) before opening a bug report to see if your issue has already been addressed.) - placeholder: v3.0.6 + placeholder: v3.0.7 validations: required: true - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 7af2cf0b8..6a3f81e1e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -14,7 +14,7 @@ body: attributes: label: NetBox version description: What version of NetBox are you currently running? - placeholder: v3.0.6 + placeholder: v3.0.7 validations: required: true - type: dropdown diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index 015935884..98ee0b2e0 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -1,6 +1,6 @@ # NetBox v3.0 -## v3.0.7 (FUTURE) +## v3.0.7 (2021-10-08) ### Enhancements diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 51f7265c5..11b8b3948 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -16,7 +16,7 @@ from django.core.validators import URLValidator # Environment setup # -VERSION = '3.0.7-dev' +VERSION = '3.0.7' # Hostname HOSTNAME = platform.node() diff --git a/requirements.txt b/requirements.txt index 2aa9b175b..8aa3b8a5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ gunicorn==20.1.0 Jinja2==3.0.2 Markdown==3.3.4 markdown-include==0.6.0 -mkdocs-material==7.3.1 +mkdocs-material==7.3.2 netaddr==0.8.0 Pillow==8.3.2 psycopg2-binary==2.9.1 From 1a4f8c5422206ca1c076477637d35399bae49701 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 8 Oct 2021 14:08:42 -0400 Subject: [PATCH 3/3] PRVB --- docs/release-notes/version-3.0.md | 4 ++++ netbox/netbox/settings.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index 98ee0b2e0..25295b621 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -1,5 +1,9 @@ # NetBox v3.0 +## v3.0.8 (FUTURE) + +--- + ## v3.0.7 (2021-10-08) ### Enhancements diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 11b8b3948..3df9a855a 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -16,7 +16,7 @@ from django.core.validators import URLValidator # Environment setup # -VERSION = '3.0.7' +VERSION = '3.0.8-dev' # Hostname HOSTNAME = platform.node()