Prettified device type view

This commit is contained in:
Jeremy Stretch 2016-07-14 12:39:55 -04:00
parent 46b1ac23af
commit 4ce40891f0

View File

@ -42,7 +42,7 @@
<table class="table table-hover panel-body"> <table class="table table-hover panel-body">
<tr> <tr>
<td>Manufacturer</td> <td>Manufacturer</td>
<td>{{ devicetype.manufacturer }}</td> <td><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ devicetype.manufacturer.slug }}">{{ devicetype.manufacturer }}</a></td>
</tr> </tr>
<tr> <tr>
<td>Model Name</td> <td>Model Name</td>
@ -54,7 +54,13 @@
</tr> </tr>
<tr> <tr>
<td>Full Depth</td> <td>Full Depth</td>
<td>{{ devicetype.is_full_depth|yesno|capfirst }}</td> <td>
{% if devicetype.is_full_depth %}
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
{% else %}
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
{% endif %}
</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -64,20 +70,64 @@
</div> </div>
<table class="table table-hover panel-body"> <table class="table table-hover panel-body">
<tr> <tr>
<td>Is a Console Server</td> <td class="text-right">
<td>{{ devicetype.is_console_server|yesno|capfirst }}</td> {% if devicetype.is_console_server %}
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
{% else %}
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
{% endif %}
</td>
<td>
<strong>Console Server</strong><br />
<small class="text-muted">This device {% if devicetype.is_console_server %}has{% else %}does not have{% endif %} console server ports</small>
</td>
</tr> </tr>
<tr> <tr>
<td>Is a PDU</td> <td class="text-right">
<td>{{ devicetype.is_pdu|yesno|capfirst }}</td> {% if devicetype.is_pdu %}
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
{% else %}
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
{% endif %}
</td>
<td>
<strong>PDU</strong><br />
<small class="text-muted">This device {% if devicetype.is_pdu %}has{% else %}does not have{% endif %} power outlets</small>
</td>
</tr> </tr>
<tr> <tr>
<td>Is a Network Device</td> <td class="text-right">
<td>{{ devicetype.is_network_device|yesno|capfirst }}</td> {% if devicetype.is_network_device %}
<i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
{% else %}
<i class="glyphicon glyphicon-remove text-danger" title="No"></i>
{% endif %}
</td>
<td>
<strong>Network Device</strong><br />
<small class="text-muted">This device {% if devicetype.is_network_device %}has{% else %}does not have{% endif %} non-management network interfaces</small>
</td>
</tr> </tr>
<tr> <tr>
<td>Parent/Child Role</td> <td class="text-right">
<td>{{ devicetype.get_subdevice_role_display }}</td> {% if devicetype.subdevice_role == True %}
<label class="label label-primary">Parent</label>
{% elif devicetype.subdevice_role == False %}
<label class="label label-info">Child</label>
{% else %}
<label class="label label-default">None</label>
{% endif %}
</td>
<td>
<strong>Parent/Child</strong><br />
{% if devicetype.subdevice_role == True %}
<small class="text-muted">This device has device bays for mounting child devices</small>
{% elif devicetype.subdevice_role == False %}
<small class="text-muted">This device can only be mounted in a parent device</small>
{% else %}
<small class="text-muted">This device does not have device bays</small>
{% endif %}
</td>
</tr> </tr>
</table> </table>
</div> </div>