Skip to content

Commit

Permalink
Merge pull request #431 from peteeckel/feature/filter-records-by-view
Browse files Browse the repository at this point in the history
Added filtering by View to RecordFilterForm
  • Loading branch information
peteeckel authored Oct 13, 2024
2 parents 2e2b96d + 2982d2d commit 720a3fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions netbox_dns/forms/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
fieldsets = (
FieldSet("q", "filter_id", "tag"),
FieldSet(
"view_id",
"zone_id",
"name",
"fqdn",
Expand Down Expand Up @@ -152,10 +153,18 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
required=False,
label=_("Status"),
)
view_id = DynamicModelMultipleChoiceField(
queryset=View.objects.all(),
required=False,
label=_("View"),
)
zone_id = DynamicModelMultipleChoiceField(
queryset=Zone.objects.all(),
required=False,
label=_("Zone"),
query_params={
"view_id": "$view_id",
},
)
active = forms.NullBooleanField(
required=False,
Expand Down

0 comments on commit 720a3fc

Please sign in to comment.