| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- {% extends '_base.html' %}
- {% load helpers %}
- {% load render_table from django_tables2 %}
- {% block title %}{{ devicetype }}{% endblock %}
- {% block content %}
- <div class="row">
- <div class="col-md-12">
- <ol class="breadcrumb">
- <li><a href="{% url 'dcim:devicetype_list' %}">Device Types</a></li>
- <li><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ devicetype.manufacturer.slug }}">{{ devicetype.manufacturer }}</a></li>
- <li>{{ devicetype.model }}</li>
- </ol>
- </div>
- </div>
- {% if perms.dcim.change_devicetype or perms.dcim.delete_devicetype %}
- <div class="pull-right">
- {% if perms.dcim.change_devicetype %}
- <a href="{% url 'dcim:devicetype_edit' pk=devicetype.pk %}" class="btn btn-warning">
- <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
- Edit this device type
- </a>
- {% endif %}
- {% if perms.dcim.delete_devicetype %}
- <a href="{% url 'dcim:devicetype_delete' pk=devicetype.pk %}" class="btn btn-danger">
- <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
- Delete this device type
- </a>
- {% endif %}
- </div>
- {% endif %}
- <h1>{{ devicetype }}</h1>
- <div class="row">
- <div class="col-md-6">
- <div class="panel panel-default">
- <div class="panel-heading">
- <strong>Chassis</strong>
- </div>
- <table class="table table-hover panel-body">
- <tr>
- <td>Manufacturer</td>
- <td><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ devicetype.manufacturer.slug }}">{{ devicetype.manufacturer }}</a></td>
- </tr>
- <tr>
- <td>Model Name</td>
- <td>{{ devicetype.model }}</td>
- </tr>
- <tr>
- <td>Height (U)</td>
- <td>{{ devicetype.u_height }}</td>
- </tr>
- <tr>
- <td>Full Depth</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>
- </table>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">
- <strong>Function</strong>
- </div>
- <table class="table table-hover panel-body">
- <tr>
- <td class="text-right">
- {% 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>
- <td class="text-right">
- {% 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>
- <td class="text-right">
- {% 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>
- <td class="text-right">
- {% 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>
- </table>
- </div>
- {% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' add_url='dcim:devicetype_add_consoleport' delete_url='dcim:devicetype_delete_consoleport' %}
- {% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' add_url='dcim:devicetype_add_powerport' delete_url='dcim:devicetype_delete_powerport' %}
- {% include 'dcim/inc/devicetype_component_table.html' with table=mgmt_interface_table title='Management Interfaces' add_url='dcim:devicetype_add_interface' add_url_extra='?mgmt_only=1' delete_url='dcim:devicetype_delete_interface' %}
- </div>
- <div class="col-md-6">
- {% if devicetype.is_parent_device %}
- {% include 'dcim/inc/devicetype_component_table.html' with table=devicebay_table title='Device Bays' add_url='dcim:devicetype_add_devicebay' delete_url='dcim:devicetype_delete_devicebay' %}
- {% endif %}
- {% if devicetype.is_network_device %}
- {% include 'dcim/inc/devicetype_component_table.html' with table=interface_table title='Interfaces' add_url='dcim:devicetype_add_interface' delete_url='dcim:devicetype_delete_interface' %}
- {% endif %}
- {% if devicetype.is_console_server %}
- {% include 'dcim/inc/devicetype_component_table.html' with table=consoleserverport_table title='Console Server Ports' add_url='dcim:devicetype_add_consoleserverport' delete_url='dcim:devicetype_delete_consoleserverport' %}
- {% endif %}
- {% if devicetype.is_pdu %}
- {% include 'dcim/inc/devicetype_component_table.html' with table=poweroutlet_table title='Power Outlets' add_url='dcim:devicetype_add_poweroutlet' delete_url='dcim:devicetype_delete_poweroutlet' %}
- {% endif %}
- </div>
- </div>
- {% endblock %}
|