diff --git a/CHANGELOG.md b/CHANGELOG.md index 40acb31cd..78753bc2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ v2.5.1 (FUTURE) ## Enhancements * [#2655](https://github.com/digitalocean/netbox/issues/2655) - Add 128GFC Fibrechannel interface type +* [#2674](https://github.com/digitalocean/netbox/issues/2674) - Enable filtering changelog by object type under web UI ## Bug Fixes diff --git a/netbox/extras/forms.py b/netbox/extras/forms.py index c0d6732d1..40d22aafb 100644 --- a/netbox/extras/forms.py +++ b/netbox/extras/forms.py @@ -11,7 +11,7 @@ from taggit.models import Tag from dcim.models import DeviceRole, Platform, Region, Site from tenancy.models import Tenant, TenantGroup from utilities.forms import ( - add_blank_choice, BootstrapMixin, BulkEditForm, BulkEditNullBooleanSelect, FilterChoiceField, + add_blank_choice, BootstrapMixin, BulkEditForm, BulkEditNullBooleanSelect, ContentTypeSelect, FilterChoiceField, FilterTreeNodeMultipleChoiceField, LaxURLField, JSONField, SlugField, ) from .constants import ( @@ -307,7 +307,7 @@ class ImageAttachmentForm(BootstrapMixin, forms.ModelForm): # Change logging # -class ObjectChangeFilterForm(BootstrapMixin, CustomFieldFilterForm): +class ObjectChangeFilterForm(BootstrapMixin, forms.Form): model = ObjectChange q = forms.CharField( required=False, @@ -336,3 +336,9 @@ class ObjectChangeFilterForm(BootstrapMixin, CustomFieldFilterForm): queryset=User.objects.order_by('username'), required=False ) + changed_object_type = forms.ModelChoiceField( + queryset=ContentType.objects.order_by('model'), + required=False, + widget=ContentTypeSelect(), + label='Object Type' + )