1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Use embedded table to show assigned services under object view

This commit is contained in:
jeremystretch
2023-01-25 20:25:06 -05:00
committed by jeremystretch
parent 8f7c100e22
commit 0f6995e92a
7 changed files with 39 additions and 104 deletions

View File

@@ -282,7 +282,20 @@
</div>
</div>
{% endif %}
{% include 'inc/panels/services.html' %}
<div class="card">
<h5 class="card-header">Services</h5>
<div class="card-body htmx-container table-responsive"
hx-get="{% url 'ipam:service_list' %}?device_id={{ object.pk }}"
hx-trigger="load"
></div>
{% if perms.ipam.add_service %}
<div class="card-footer text-end noprint">
<a href="{% url 'ipam:service_add' %}?device={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add a service
</a>
</div>
{% endif %}
</div>
{% include 'inc/panels/contacts.html' %}
{% include 'inc/panels/image_attachments.html' %}
{% if object.rack and object.position %}