Skip to content

Commit 48bd86a

Browse files
committed
feat(filter): ACLStandardRule: Instruct new Sources to be displayed as Tabbed Group; Improve Fieldsets
1 parent 8faf5f7 commit 48bd86a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

netbox_acls/forms/filtersets.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
TagFilterField,
2020
)
2121
from utilities.forms.utils import add_blank_choice
22+
from utilities.forms.rendering import FieldSet, TabbedGroups
2223
from virtualization.models import VirtualMachine, VMInterface
2324

2425

@@ -228,10 +229,26 @@ class ACLStandardRuleFilterForm(NetBoxModelFilterSetForm):
228229
)
229230
fieldsets = (
230231
(None, ("q", "tag")),
231-
("Rule Details", ("access_list", "action", "source_prefix")),
232+
(
233+
"Rule Details",
234+
(
235+
"access_list",
236+
"action",
237+
),
238+
),
239+
FieldSet(
240+
TabbedGroups(
241+
FieldSet('source_prefix', name=_('Prefix')),
242+
FieldSet('source_iprange', name=_('IP Range')),
243+
FieldSet('source_ipaddress', name=_('IP Address')),
244+
FieldSet('source_aggregate', name=_('Aggregate')),
245+
FieldSet('source_service', name=_('Service')),
246+
)
247+
)
232248
)
233249

234250

251+
235252
class ACLExtendedRuleFilterForm(NetBoxModelFilterSetForm):
236253
"""
237254
GUI filter form to search the django ACLExtendedRule model.

0 commit comments

Comments
 (0)