Clean up interface template

This commit is contained in:
jeremystretch 2022-03-23 10:51:38 -04:00
parent 61eb22f4f7
commit 42446cb87b

View File

@ -23,9 +23,7 @@
<div class="row mb-3">
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">
Interface
</h5>
<h5 class="card-header">Interface</h5>
<div class="card-body">
<table class="table table-hover">
<tr>
@ -49,12 +47,15 @@
<td>{{ object.get_type_display }}</td>
</tr>
<tr>
<th scope="row">Speed</th>
<td>{{ object.speed|humanize_speed|placeholder }}</td>
<th scope="row">Speed/Duplex</th>
<td>
{{ object.speed|humanize_speed|placeholder }} /
{{ object.get_duplex_display|placeholder }}
</td>
</tr>
<tr>
<th scope="row">Duplex</th>
<td>{{ object.get_duplex_display }}</td>
<th scope="row">MTU</th>
<td>{{ object.mtu|placeholder }}</td>
</tr>
<tr>
<th scope="row">Enabled</th>
@ -64,6 +65,25 @@
<th scope="row">Management Only</th>
<td>{% checkmark object.mgmt_only %}</td>
</tr>
<tr>
<th scope="row">Description</th>
<td>{{ object.description|placeholder }} </td>
</tr>
<tr>
<th scope="row">802.1Q Mode</th>
<td>{{ object.get_mode_display|placeholder }}</td>
</tr>
<tr>
<th scope="row">Transmit power (dBm)</th>
<td>{{ object.tx_power|placeholder }}</td>
</tr>
</table>
</div>
</div>
<div class="card">
<h5 class="card-header">Related Interfaces</h5>
<div class="card-body">
<table class="table table-hover">
<tr>
<th scope="row">Parent</th>
<td>{{ object.parent|linkify|placeholder }}</td>
@ -76,14 +96,18 @@
<th scope="row">LAG</th>
<td>{{ object.lag|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Description</th>
<td>{{ object.description|placeholder }} </td>
</tr>
<tr>
<th scope="row">MTU</th>
<td>{{ object.mtu|placeholder }}</td>
</tr>
</table>
</div>
</div>
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' %}
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">Addressing</h5>
<div class="card-body">
<table class="table table-hover">
<tr>
<th scope="row">MAC Address</th>
<td><span class="text-monospace">{{ object.mac_address|placeholder }}</span></td>
@ -92,14 +116,6 @@
<th scope="row">WWN</th>
<td><span class="text-monospace">{{ object.wwn|placeholder }}</span></td>
</tr>
<tr>
<th scope="row">Transmit power (dBm)</th>
<td>{{ object.tx_power|placeholder }}</td>
</tr>
<tr>
<th scope="row">802.1Q Mode</th>
<td>{{ object.get_mode_display|placeholder }}</td>
</tr>
<tr>
<th scope="row">VRF</th>
<td>{{ object.vrf|linkify|placeholder }}</td>
@ -107,16 +123,9 @@
</table>
</div>
</div>
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' %}
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
{% if not object.is_virtual %}
<div class="card">
<h5 class="card-header">
Connection
</h5>
<h5 class="card-header">Connection</h5>
<div class="card-body">
{% if object.mark_connected %}
<div class="text-muted">
@ -361,13 +370,7 @@
<tbody>
{% for wlan in object.wireless_lans.all %}
<tr>
<td>
{% if wlan.group %}
{{ wlan.group|linkify }}
{% else %}
&mdash;
{% endif %}
</td>
<td>{{ wlan.group|linkify|placeholder }}</td>
<td>{{ wlan|linkify:"ssid" }}</td>
</tr>
{% empty %}
@ -417,9 +420,7 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
IP Addresses
</h5>
<h5 class="card-header">IP Addresses</h5>
<div class="card-body table-responsive">
{% if ipaddress_table.rows %}
{% render_table ipaddress_table 'inc/table.html' %}