mirror of
https://github.com/lucaspalomodevelop/netbox-acls.git
synced 2026-03-12 23:27:23 +00:00
fixed rules table rendering
This commit is contained in:
parent
e0c3a9a5f9
commit
8713dd165b
@ -62,11 +62,11 @@
|
||||
{% elif object.type == 'extended' %}
|
||||
<td>{{ object.aclextendedrules.count|placeholder }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Assigned Host</th>
|
||||
<td>{{ object.assigned_object|linkify }}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -77,7 +77,8 @@
|
||||
{% include 'inc/panels/comments.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% if rules_table %}
|
||||
<div class="row">
|
||||
<div class="col col-md-12">
|
||||
<div class="card">
|
||||
<h5 class="card-header">{{ object.get_type_display }} Rules</h5>
|
||||
@ -87,4 +88,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
||||
@ -53,11 +53,16 @@ class AccessListView(generic.ObjectView):
|
||||
table = tables.ACLExtendedRuleTable(instance.aclextendedrules.all())
|
||||
elif instance.type == choices.ACLTypeChoices.TYPE_STANDARD:
|
||||
table = tables.ACLStandardRuleTable(instance.aclstandardrules.all())
|
||||
table.configure(request)
|
||||
else:
|
||||
table = None
|
||||
|
||||
return {
|
||||
"rules_table": table,
|
||||
}
|
||||
if table:
|
||||
table.configure(request)
|
||||
|
||||
return {
|
||||
"rules_table": table,
|
||||
}
|
||||
return {}
|
||||
|
||||
|
||||
class AccessListListView(generic.ObjectListView):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user