UI Standardization (#36)

* first pass of UI name capitalization

* update ACL rule placeholder in UI
This commit is contained in:
Ryan Merolle 2022-07-14 22:32:33 -04:00 committed by GitHub
parent dac1ab9f5c
commit c4f282ee83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View File

@ -52,7 +52,8 @@ class AccessList(NetBoxModel):
default_action = models.CharField(
default=AccessListActionChoices.ACTION_DENY,
max_length=30,
choices=AccessListActionChoices
choices=AccessListActionChoices,
verbose_name='Default Action'
)
comments = models.TextField(
blank=True
@ -79,6 +80,7 @@ class AccessListRule(NetBoxModel):
on_delete=models.CASCADE,
related_name='rules',
to=AccessList,
verbose_name='Access List'
)
index = models.PositiveIntegerField()
protocol = models.CharField(
@ -92,11 +94,13 @@ class AccessListRule(NetBoxModel):
on_delete=models.PROTECT,
related_name='+',
to='ipam.Prefix',
verbose_name='Source Prefix'
)
source_ports = ArrayField(
base_field=models.PositiveIntegerField(),
blank=True,
null=True,
verbose_name='Soure Ports'
)
destination_prefix = models.ForeignKey(
blank=True,
@ -104,11 +108,13 @@ class AccessListRule(NetBoxModel):
on_delete=models.PROTECT,
related_name='+',
to='ipam.Prefix',
verbose_name='Destination Prefix'
)
destination_ports = ArrayField(
base_field=models.PositiveIntegerField(),
blank=True,
null=True,
verbose_name='Destination Ports'
)
action = models.CharField(
choices=AccessListActionChoices,

View File

@ -13,7 +13,9 @@ class AccessListTable(NetBoxTable):
)
type = ChoiceFieldColumn()
default_action = ChoiceFieldColumn()
rule_count = tables.Column()
rule_count = tables.Column(
verbose_name='Rule Count'
)
tags = columns.TagColumn(
url_name='plugins:netbox_access_lists:accesslist_list'
)

View File

@ -54,7 +54,7 @@
<td>{{ object.get_type_display }}</td>
</tr>
<tr>
<th scope="row">Default action</th>
<th scope="row">Default Action</th>
<td>{{ object.get_default_action_display }}</td>
</tr>
<tr>

View File

@ -30,11 +30,11 @@
<table class="table table-hover attr-table">
<tr>
<th scope="row">Remark</th>
<td>{{ object.get_remark_display }}</td>
<td>{{ object.get_remark_display|placeholder }}</td>
</tr>
<tr>
<th scope="row">Protocol</th>
<td>{{ object.get_protocol_display }}</td>
<td>{{ object.get_protocol_display|placeholder }}</td>
</tr>
<tr>
<th scope="row">Source Prefix</th>