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

Closes #6620: Show assigned VMs count under device role view

This commit is contained in:
jeremystretch
2021-06-22 14:21:41 -04:00
parent a8af24d7ca
commit 4292d88a92
3 changed files with 17 additions and 1 deletions

View File

@@ -42,7 +42,17 @@
<tr>
<td>Devices</td>
<td>
<a href="{% url 'dcim:device_list' %}?role_id={{ object.pk }}">{{ devices_table.rows|length }}</a>
<a href="{% url 'dcim:device_list' %}?role_id={{ object.pk }}">{{ device_count }}</a>
</td>
</tr>
<tr>
<td>Virtual Machines</td>
<td>
{% if object.vm_role %}
<a href="{% url 'virtualization:virtualmachine_list' %}?role_id={{ object.pk }}">{{ virtualmachine_count }}</a>
{% else %}
&mdash;
{% endif %}
</td>
</tr>
</table>