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

Standardized naming of reverse relationships from component templates to DeviceType

This commit is contained in:
Jeremy Stretch
2018-11-02 11:55:52 -04:00
parent cf9c8f35a0
commit 3ea2978df4
5 changed files with 58 additions and 38 deletions

View File

@@ -136,7 +136,7 @@
</div>
</div>
</div>
{% if devicetype.console_port_templates.exists or devicetype.power_port_templates.exists %}
{% if devicetype.consoleport_templates.exists or devicetype.powerport_templates.exists %}
<div class="row">
<div class="col-md-6">
{% 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' %}
@@ -153,13 +153,20 @@
</div>
</div>
{% endif %}
{% if devicetype.cs_port_templates.exists %}
{% if devicetype.consoleserverport_templates.exists %}
<div class="row">
<div class="col-md-12">
{% 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' %}
</div>
</div>
{% endif %}
{% if devicetype.poweroutlet_templates.exists %}
<div class="row">
<div class="col-md-12">
{% 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' %}
</div>
</div>
{% endif %}
{% if devicetype.interface_templates.exists %}
<div class="row">
<div class="col-md-12">
@@ -167,14 +174,7 @@
</div>
</div>
{% endif %}
{% if devicetype.power_outlet_templates.exists %}
<div class="row">
<div class="col-md-12">
{% 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' %}
</div>
</div>
{% endif %}
{% if devicetype.front_port_templates.exists or devicetype.rear_port_templates.exists %}
{% if devicetype.frontport_templates.exists or devicetype.rearport_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' %}