mirror of
https://github.com/lucaspalomodevelop/netbox-acls.git
synced 2026-03-12 23:27:23 +00:00
organize template directories
This commit is contained in:
parent
47c64ebd42
commit
2828a355f2
@ -17,7 +17,7 @@ class AccessLists(PluginTemplateExtension):
|
||||
#elif ctype.model == 'virtualmachine':
|
||||
# access_lists = AccessList.objects.filter(device=obj.pk)
|
||||
|
||||
return self.render('inc/device_access_lists.html', extra_context={
|
||||
return self.render('inc/device/access_lists.html', extra_context={
|
||||
'access_lists': access_lists,
|
||||
'type': ctype.model if ctype.model == 'device' else ctype.name.replace(' ', '_'),
|
||||
})
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
Access Lists
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
{% include 'inc/assigned_access_lists.html' %}
|
||||
{% include 'inc/device/assigned_access_lists.html' %}
|
||||
</div>
|
||||
<div class="card-footer text-end noprint">
|
||||
<a href="{% url 'plugins:netbox_access_lists:accesslist_add' %}?{{ type }}={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-primary">
|
||||
@ -46,24 +46,6 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Source Ports</th>
|
||||
<td>{{ object.source_ports|join:", "|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Destination Prefix</th>
|
||||
<td>
|
||||
{% if object.destination_prefix %}
|
||||
<a href="{{ object.destination_prefix.get_absolute_url }}">{{ object.destination_prefix }}</a>
|
||||
{% else %}
|
||||
{{ ''|placeholder }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Destination Ports</th>
|
||||
<td>{{ object.destination_ports|join:", "|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Action</th>
|
||||
<td>{{ object.get_action_display }}</td>
|
||||
Loading…
x
Reference in New Issue
Block a user