Skip to content

Commit 91431da

Browse files
committed
feat(table): ACLExtendedRule: Changing Source Prefix to a single Source column that will display any Source
1 parent 4c5b49b commit 91431da

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

netbox_acls/tables.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ class ACLExtendedRuleTable(NetBoxTable):
201201
tags = columns.TagColumn(
202202
url_name="plugins:netbox_acls:aclextendedrule_list",
203203
)
204+
source = tables.TemplateColumn(
205+
template_code=COL_SOURCE_AND_DESTINATION_ASSIGNMENT.replace('#replaceme#', 'source'),
206+
order_by=('source_prefix', 'source_iprange', 'source_ipaddress', 'source_aggregate', 'source_service')
207+
)
204208
protocol = ChoiceFieldColumn()
205209

206210
class Meta(NetBoxTable.Meta):
@@ -214,7 +218,7 @@ class Meta(NetBoxTable.Meta):
214218
"remark",
215219
"tags",
216220
"description",
217-
"source_prefix",
221+
"source",
218222
"source_ports",
219223
"destination_prefix",
220224
"destination_ports",
@@ -226,7 +230,7 @@ class Meta(NetBoxTable.Meta):
226230
"action",
227231
"remark",
228232
"tags",
229-
"source_prefix",
233+
"source",
230234
"source_ports",
231235
"destination_prefix",
232236
"destination_ports",

0 commit comments

Comments
 (0)