|
@@ -1,40 +1,54 @@
|
|
|
{% load helpers %}
|
|
{% load helpers %}
|
|
|
|
|
|
|
|
<div class="card">
|
|
<div class="card">
|
|
|
-<h5 class="card-header">
|
|
|
|
|
- Non-Racked Devices
|
|
|
|
|
-</h5>
|
|
|
|
|
-<div class="card-body">
|
|
|
|
|
-{% if nonracked_devices %}
|
|
|
|
|
- <table class="table table-hover">
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>Name</th>
|
|
|
|
|
- <th>Role</th>
|
|
|
|
|
- <th>Type</th>
|
|
|
|
|
- <th colspan="2">Parent Device</th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% for device in nonracked_devices %}
|
|
|
|
|
- <tr{% if device.device_type.u_height %} class="warning"{% endif %}>
|
|
|
|
|
- <td>
|
|
|
|
|
- <a href="{% url 'dcim:device' pk=device.pk %}">{{ device }}</a>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>{{ device.device_role }}</td>
|
|
|
|
|
- <td>{{ device.device_type }}</td>
|
|
|
|
|
- {% if device.parent_bay %}
|
|
|
|
|
- <td>{{ device.parent_bay.device|linkify }}</td>
|
|
|
|
|
- <td>{{ device.parent_bay }}</td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td colspan="2" class="text-muted">—</td>
|
|
|
|
|
|
|
+ <h5 class="card-header">
|
|
|
|
|
+ Non-Racked Devices
|
|
|
|
|
+ </h5>
|
|
|
|
|
+ <div class="card-body">
|
|
|
|
|
+ {% if nonracked_devices %}
|
|
|
|
|
+ <table class="table table-hover">
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>Name</th>
|
|
|
|
|
+ <th>Role</th>
|
|
|
|
|
+ <th>Type</th>
|
|
|
|
|
+ <th colspan="2">Parent Device</th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ {% for device in nonracked_devices %}
|
|
|
|
|
+ <tr{% if device.device_type.u_height %} class="warning"{% endif %}>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <a href="{% url 'dcim:device' pk=device.pk %}">{{ device }}</a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>{{ device.device_role }}</td>
|
|
|
|
|
+ <td>{{ device.device_type }}</td>
|
|
|
|
|
+ {% if device.parent_bay %}
|
|
|
|
|
+ <td>{{ device.parent_bay.device|linkify }}</td>
|
|
|
|
|
+ <td>{{ device.parent_bay }}</td>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <td colspan="2" class="text-muted">—</td>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ {% endfor %}
|
|
|
|
|
+ </table>
|
|
|
|
|
+
|
|
|
|
|
+ {% if total_nonracked_devices_count > nonracked_devices.count %}
|
|
|
|
|
+ {% if object|meta:'verbose_name' == 'site' %}
|
|
|
|
|
+ <div class="text-muted">
|
|
|
|
|
+ Displaying {{ nonracked_devices.count }} of {{ total_nonracked_devices_count }} devices (<a href="{% url 'dcim:device_list' %}?site_id={{ object.pk }}&rack_id=null">View full list</a>)
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {% elif object|meta:'verbose_name' == 'location' %}
|
|
|
|
|
+ <div class="text-muted">
|
|
|
|
|
+ Displaying {{ nonracked_devices.count }} of {{ total_nonracked_devices_count }} devices (<a href="{% url 'dcim:device_list' %}?location_id={{ object.pk }}&rack_id=null">View full list</a>)
|
|
|
|
|
+ </div>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
- </tr>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- </table>
|
|
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+
|
|
|
{% else %}
|
|
{% else %}
|
|
|
<div class="text-muted">
|
|
<div class="text-muted">
|
|
|
None
|
|
None
|
|
|
</div>
|
|
</div>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
{% if perms.dcim.add_device %}
|
|
{% if perms.dcim.add_device %}
|
|
|
{% if object|meta:'verbose_name' == 'rack' %}
|
|
{% if object|meta:'verbose_name' == 'rack' %}
|
|
|
<div class="card-footer text-end noprint">
|
|
<div class="card-footer text-end noprint">
|