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

Removed 'is_patch_panel' from DeviceType

This commit is contained in:
Jeremy Stretch
2018-10-25 12:44:28 -04:00
parent b19e2037af
commit 266429101b
8 changed files with 19 additions and 55 deletions

View File

@@ -689,12 +689,12 @@
</form>
{% endif %}
{% endif %}
{% if front_ports or device.device_type.is_patch_panel %}
{% if front_ports %}
<form method="post">
{% csrf_token %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Front Panel Ports</strong>
<strong>Front Ports</strong>
</div>
<table class="table table-hover table-headings panel-body component-list">
<thead>
@@ -742,12 +742,12 @@
</div>
</form>
{% endif %}
{% if rear_ports or device.device_type.is_patch_panel %}
{% if rear_ports %}
<form method="post">
{% csrf_token %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Rear Panel Ports</strong>
<strong>Rear Ports</strong>
</div>
<table class="table table-hover table-headings panel-body component-list">
<thead>

View File

@@ -135,19 +135,6 @@
<small class="text-muted">This device {% if devicetype.is_network_device %}has{% else %}does not have{% endif %} network interfaces</small>
</td>
</tr>
<tr>
<td class="text-right">
{% if devicetype.is_patch_panel %}
<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>Patch Panel</strong><br />
<small class="text-muted">This device {% if devicetype.is_patch_panel %}has{% else %}does not have{% endif %} patch panel ports</small>
</td>
</tr>
<tr>
<td class="text-right">
{% if devicetype.subdevice_role == True %}
@@ -201,12 +188,16 @@
{% if devicetype.is_pdu or poweroutlet_table.rows %}
{% 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 %}
{% if devicetype.is_patch_panel or front_port_table.rows %}
{% include 'dcim/inc/devicetype_component_table.html' with table=front_port_table title='Front Panel Ports' add_url='dcim:devicetype_add_frontport' delete_url='dcim:devicetype_delete_frontport' %}
{% endif %}
{% if devicetype.is_patch_panel or rear_port_table.rows %}
{% include 'dcim/inc/devicetype_component_table.html' with table=rear_port_table title='Rear Panel Ports' add_url='dcim:devicetype_add_rearport' delete_url='dcim:devicetype_delete_rearport' %}
{% endif %}
</div>
</div>
{% if devicetype.front_port_templates.exists or devicetype.rear_port_templates.exists %}
<div class="row">
<div class="col-md-6">
{% include 'dcim/inc/devicetype_component_table.html' with table=front_port_table title='Front Ports' add_url='dcim:devicetype_add_frontport' delete_url='dcim:devicetype_delete_frontport' %}
</div>
<div class="col-md-6">
{% include 'dcim/inc/devicetype_component_table.html' with table=rear_port_table title='Rear Ports' add_url='dcim:devicetype_add_rearport' delete_url='dcim:devicetype_delete_rearport' %}
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -20,7 +20,6 @@
{% render_field form.is_console_server %}
{% render_field form.is_pdu %}
{% render_field form.is_network_device %}
{% render_field form.is_patch_panel %}
{% render_field form.subdevice_role %}
</div>
</div>