mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Display component templates under tabs
This commit is contained in:
@ -63,7 +63,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@ -154,58 +154,66 @@
|
||||
</div>
|
||||
{% plugin_right_page devicetype %}
|
||||
</div>
|
||||
</div>
|
||||
{% if devicetype.consoleporttemplates.exists or devicetype.powerporttemplates.exists %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page devicetype %}
|
||||
</div>
|
||||
</div>
|
||||
{% if devicetype.is_parent_device or devicebay_table.rows %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#interfaces" role="tab" data-toggle="tab">Interfaces {% badge interface_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#frontports" role="tab" data-toggle="tab">Front Ports {% badge front_port_table_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#rearports" role="tab" data-toggle="tab">Rear Ports {% badge rear_port_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#consoleports" role="tab" data-toggle="tab">Console Ports {% badge consoleport_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#consoleserverports" role="tab" data-toggle="tab">Console Server Ports {% badge consoleserverport_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#powerports" role="tab" data-toggle="tab">Power Ports {% badge powerport_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#poweroutlets" role="tab" data-toggle="tab">Power Outlets {% badge poweroutlet_table.rows|length %}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#devicebays" role="tab" data-toggle="tab">Device Bays {% badge devicebay_table.rows|length %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="interfaces">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=interface_table title='Interfaces' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="frontports">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=front_port_table title='Front Ports' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="rearports">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=rear_port_table title='Rear Ports' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="consoleports">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="consoleserverports">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleserverport_table title='Console Server Ports' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="powerports">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="poweroutlets">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=poweroutlet_table title='Power Outlets' %}
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="devicebays">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=devicebay_table title='Device Bays' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.consoleserverporttemplates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleserverport_table title='Console Server Ports' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.poweroutlettemplates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=poweroutlet_table title='Power Outlets' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.interfacetemplates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=interface_table title='Interfaces' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if devicetype.frontporttemplates.exists or devicetype.rearporttemplates.exists %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=front_port_table title='Front Ports' %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'dcim/inc/devicetype_component_table.html' with table=rear_port_table title='Rear Ports' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user