Skip to content

Commit c8a19b6

Browse files
committed
feat(filter): ACLStandardRule: Instruct new Sources to be displayed as Tabbed Group; Improve Fieldsets
1 parent 668551e commit c8a19b6

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

netbox_acls/forms/filtersets.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
TagFilterField,
2121
)
2222
from utilities.forms.utils import add_blank_choice
23+
from utilities.forms.rendering import FieldSet, TabbedGroups
2324
from virtualization.models import VirtualMachine, VMInterface
2425

2526

@@ -218,9 +219,25 @@ class ACLStandardRuleFilterForm(NetBoxModelFilterSetForm):
218219
)
219220

220221
fieldsets = (
221-
FieldSet("access_list", "action", "source_prefix", name=_('Rule Details')),
222-
FieldSet("q", "tag",name=None)
222+
FieldSet("q", "tag",name=None),
223+
FieldSet(
224+
"access_list",
225+
"action",
226+
name=_('Rule Details')
227+
),
228+
FieldSet(
229+
TabbedGroups(
230+
FieldSet('source_prefix', name=_('Prefix')),
231+
FieldSet('source_iprange', name=_('IP Range')),
232+
FieldSet('source_ipaddress', name=_('IP Address')),
233+
FieldSet('source_aggregate', name=_('Aggregate')),
234+
FieldSet('source_service', name=_('Service')),
235+
)
236+
)
223237
)
238+
239+
240+
224241
class ACLExtendedRuleFilterForm(NetBoxModelFilterSetForm):
225242
"""
226243
GUI filter form to search the django ACLExtendedRule model.

0 commit comments

Comments
 (0)