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

Fixes #2634: Enforce consistent representation of unnamed devices in rack view

This commit is contained in:
Jeremy Stretch
2018-12-04 15:29:58 -05:00
parent 4e3567659a
commit d3d6c83fbb
2 changed files with 3 additions and 2 deletions

View File

@ -27,13 +27,13 @@
{% ifequal u.device.face face_id %}
<a href="{% url 'dcim:device' pk=u.device.pk %}" data-toggle="popover" data-trigger="hover" data-container="body" data-html="true"
data-content="{{ u.device.device_role }}<br />{{ u.device.device_type.full_name }} ({{ u.device.device_type.u_height }}U){% if u.device.asset_tag %}<br />{{ u.device.asset_tag }}{% endif %}{% if u.device.serial %}<br />{{ u.device.serial }}{% endif %}">
{{ u.device.name|default:u.device.device_role }}
{{ u.device }}
{% if u.device.devicebay_count %}
({{ u.device.get_children.count }}/{{ u.device.devicebay_count }})
{% endif %}
</a>
{% else %}
<span>{{ u.device.name|default:u.device.device_role }}</span>
<span>{{ u.device }}</span>
{% endifequal %}
</li>
{% else %}