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