Ensure consistent use of row headings in attribute tables

This commit is contained in:
Jeremy Stretch 2024-01-12 09:39:18 -05:00
parent 04dc9a12ad
commit a16f272535
14 changed files with 85 additions and 85 deletions

View File

@ -30,7 +30,7 @@
<table class="table table-hover attr-table">
{% if termination.site %}
<tr>
<td>{% trans "Site" %}</td>
<th scope="row">{% trans "Site" %}</th>
<td>
{% if termination.site.region %}
{{ termination.site.region|linkify }} /
@ -39,7 +39,7 @@
</td>
</tr>
<tr>
<td>{% trans "Termination" %}</td>
<th scope="row">{% trans "Termination" %}</th>
<td>
{% if termination.mark_connected %}
<span class="text-success"><i class="mdi mdi-check-bold"></i></span>
@ -86,12 +86,12 @@
</tr>
{% else %}
<tr>
<td>{% trans "Provider Network" %}</td>
<th scope="row">{% trans "Provider Network" %}</th>
<td>{{ termination.provider_network.provider|linkify }} / {{ termination.provider_network|linkify }}</td>
</tr>
{% endif %}
<tr>
<td>{% trans "Speed" %}</td>
<th scope="row">{% trans "Speed" %}</th>
<td>
{% if termination.port_speed and termination.upstream_speed %}
<i class="mdi mdi-arrow-down-bold" title="{% trans "Downstream" %}"></i> {{ termination.port_speed|humanize_speed }} &nbsp;
@ -104,19 +104,19 @@
</td>
</tr>
<tr>
<td>{% trans "Cross-Connect" %}</td>
<th scope="row">{% trans "Cross-Connect" %}</th>
<td>{{ termination.xconnect_id|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Patch Panel/Port" %}</td>
<th scope="row">{% trans "Patch Panel/Port" %}</th>
<td>{{ termination.pp_info|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ termination.description|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Tags" %}</td>
<th scope="row">{% trans "Tags" %}</th>
<td>
{% for tag in termination.tags.all %}
{% tag tag %}

View File

@ -14,42 +14,42 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Manufacturer" %}</td>
<th scope="row">{% trans "Manufacturer" %}</th>
<td>{{ object.manufacturer|linkify }}</td>
</tr>
<tr>
<td>{% trans "Model Name" %}</td>
<th scope="row">{% trans "Model Name" %}</th>
<td>
{{ object.model }}<br/>
<small class="text-muted">{{ object.slug }}</small>
</td>
</tr>
<tr>
<td>{% trans "Part Number" %}</td>
<th scope="row">{% trans "Part Number" %}</th>
<td>{{ object.part_number|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Default Platform" %}</td>
<th scope="row">{% trans "Default Platform" %}</th>
<td>{{ object.default_platform|linkify }}</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Height (U" %})</td>
<th scope="row">{% trans "Height (U" %})</th>
<td>{{ object.u_height|floatformat }}</td>
</tr>
<tr>
<td>{% trans "Exclude From Utilization" %})</td>
<th scope="row">{% trans "Exclude From Utilization" %})</th>
<td>{% checkmark object.exclude_from_utilization %}</td>
</tr>
<tr>
<td>{% trans "Full Depth" %}</td>
<th scope="row">{% trans "Full Depth" %}</th>
<td>{% checkmark object.is_full_depth %}</td>
</tr>
<tr>
<td>{% trans "Weight" %}</td>
<th scope="row">{% trans "Weight" %}</th>
<td>
{% if object.weight %}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
@ -59,19 +59,19 @@
</td>
</tr>
<tr>
<td>{% trans "Parent/Child" %}</td>
<th scope="row">{% trans "Parent/Child" %}</th>
<td>
{{ object.get_subdevice_role_display|placeholder }}
</td>
</tr>
<tr>
<td>{% trans "Airflow" %}</td>
<th scope="row">{% trans "Airflow" %}</th>
<td>
{{ object.get_airflow_display|placeholder }}
</td>
</tr>
<tr>
<td>{% trans "Front Image" %}</td>
<th scope="row">{% trans "Front Image" %}</th>
<td>
{% if object.front_image %}
<a href="{{ object.front_image.url }}">
@ -83,7 +83,7 @@
</td>
</tr>
<tr>
<td>{% trans "Rear Image" %}</td>
<th scope="row">{% trans "Rear Image" %}</th>
<td>
{% if object.rear_image %}
<a href="{{ object.rear_image.url }}">

View File

@ -5,19 +5,19 @@
{% if terminations.0.device %}
{# Device component #}
<tr>
<td>{% trans "Site" %}</td>
<th scope="row">{% trans "Site" %}</th>
<td>{{ terminations.0.device.site|linkify }}</td>
</tr>
<tr>
<td>{% trans "Location" %}</td>
<th scope="row">{% trans "Location" %}</th>
<td>{{ terminations.0.device.location|linkify|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Rack" %}</td>
<th scope="row">{% trans "Rack" %}</th>
<td>{{ terminations.0.device.rack|linkify|placeholder }}</td>
</tr>
<tr>
<td>{{ terminations.0|meta:"verbose_name"|capfirst }}</td>
<th scope="row">{{ terminations.0|meta:"verbose_name"|capfirst }}</th>
<td>
{% for term in terminations %}
{{term.device|linkify}}
@ -30,15 +30,15 @@
{% elif terminations.0.power_panel %}
{# Power feed #}
<tr>
<td>{% trans "Site" %}</td>
<th scope="row">{% trans "Site" %}</th>
<td>{{ terminations.0.power_panel.site|linkify }}</td>
</tr>
<tr>
<td>{% trans "Power Panel" %}</td>
<th scope="row">{% trans "Power Panel" %}</th>
<td>{{ terminations.0.power_panel|linkify }}</td>
</tr>
<tr>
<td>{{ terminations.0|meta:"verbose_name"|capfirst }}</td>
<th scope="row">{{ terminations.0|meta:"verbose_name"|capfirst }}</th>
<td>
{% for term in terminations %}
{{ term|linkify }}{% if not forloop.last %},{% endif %}
@ -48,11 +48,11 @@
{% elif terminations.0.circuit %}
{# Circuit termination #}
<tr>
<td>{% trans "Provider" %}</td>
<th scope="row">{% trans "Provider" %}</th>
<td>{{ terminations.0.circuit.provider|linkify }}</td>
</tr>
<tr>
<td>{% trans "Circuit" %}</td>
<th scope="row">{% trans "Circuit" %}</th>
<td>
{% for term in terminations %}
{{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %}

View File

@ -12,15 +12,15 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Manufacturer" %}</td>
<th scope="row">{% trans "Manufacturer" %}</th>
<td>{{ object.manufacturer|linkify }}</td>
</tr>
<tr>
<td>{% trans "Model Name" %}</td>
<th scope="row">{% trans "Model Name" %}</th>
<td>{{ object.model }}</td>
</tr>
<tr>
<td>{% trans "Part Number" %}</td>
<th scope="row">{% trans "Part Number" %}</th>
<td>{{ object.part_number|placeholder }}</td>
</tr>
<tr>
@ -28,14 +28,14 @@
<td>{{ object.description|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Weight" %}</td>
<td>
{% if object.weight %}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
<th scope="row">{% trans "Weight" %}</th>
<td>
{% if object.weight %}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
</table>
</div>

View File

@ -12,23 +12,23 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Family" %}</td>
<th scope="row">{% trans "Family" %}</th>
<td>IPv{{ object.family }}</td>
</tr>
<tr>
<td>{% trans "RIR" %}</td>
<th scope="row">{% trans "RIR" %}</th>
<td>
<a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
</td>
</tr>
<tr>
<td>{% trans "Utilization" %}</td>
<th scope="row">{% trans "Utilization" %}</th>
<td>
{% utilization_graph object.get_utilization %}
</td>
</tr>
<tr>
<td>{% trans "Tenant" %}</td>
<th scope="row">{% trans "Tenant" %}</th>
<td>
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
@ -37,11 +37,11 @@
</td>
</tr>
<tr>
<td>{% trans "Date Added" %}</td>
<th scope="row">{% trans "Date Added" %}</th>
<td>{{ object.date_added|annotated_date|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td>
</tr>
</table>

View File

@ -21,17 +21,17 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "AS Number" %}</td>
<th scope="row">{% trans "AS Number" %}</th>
<td>{{ object.asn_with_asdot }}</td>
</tr>
<tr>
<td>{% trans "RIR" %}</td>
<th scope="row">{% trans "RIR" %}</th>
<td>
<a href="{% url 'ipam:asn_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
</td>
</tr>
<tr>
<td>{% trans "Tenant" %}</td>
<th scope="row">{% trans "Tenant" %}</th>
<td>
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
@ -40,7 +40,7 @@
</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td>
</tr>
</table>

View File

@ -13,21 +13,21 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Name" %}</td>
<th scope="row">{% trans "Name" %}</th>
<td>{{ object.name }}</td>
</tr>
<tr>
<td>{% trans "RIR" %}</td>
<th scope="row">{% trans "RIR" %}</th>
<td>
<a href="{% url 'ipam:asnrange_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
</td>
</tr>
<tr>
<td>{% trans "Range" %}</td>
<th scope="row">{% trans "Range" %}</th>
<td>{{ object.range_as_string }}</td>
</tr>
<tr>
<td>{% trans "Tenant" %}</td>
<th scope="row">{% trans "Tenant" %}</th>
<td>
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
@ -36,7 +36,7 @@
</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td>
</tr>
</table>

View File

@ -20,19 +20,19 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Protocol" %}</td>
<th scope="row">{% trans "Protocol" %}</th>
<td>{{ object.get_protocol_display }}</td>
</tr>
<tr>
<td>{% trans "Group ID" %}</td>
<th scope="row">{% trans "Group ID" %}</th>
<td>{{ object.group_id }}</td>
</tr>
<tr>
<td>{% trans "Name" %}</td>
<th scope="row">{% trans "Name" %}</th>
<td>{{ object.name|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td>
</tr>
<tr>
@ -52,11 +52,11 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Authentication Type" %}</td>
<th scope="row">{% trans "Authentication Type" %}</th>
<td>{{ object.get_auth_type_display|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Authentication Key" %}</td>
<th scope="row">{% trans "Authentication Key" %}</th>
<td>{{ object.auth_key|placeholder }}</td>
</tr>
</table>

View File

@ -98,11 +98,11 @@
</td>
</tr>
<tr>
<td>Primary IP</td>
<th scope="row">Primary IP</th>
<td>{% checkmark object.is_primary_ip %}</td>
</tr>
<tr>
<td>OOB IP</td>
<th scope="row">OOB IP</th>
<td>{% checkmark object.is_oob_ip %}</td>
</tr>
</table>

View File

@ -129,7 +129,7 @@
</tr>
{% endwith %}
<tr>
<td>{% trans "First available IP" %}</td>
<th scope="row">{% trans "First available IP" %}</th>
<td>
{% with first_available_ip=object.get_first_available_ip %}
{% if first_available_ip %}
@ -184,19 +184,19 @@
<div class="modal-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Network Address" %}</td>
<th scope="row">{% trans "Network Address" %}</th>
<td>{{ object.prefix.network }}</td>
</tr>
<tr>
<td>{% trans "Network Mask" %}</td>
<th scope="row">{% trans "Network Mask" %}</th>
<td>{{ object.prefix.netmask }}</td>
</tr>
<tr>
<td>{% trans "Wildcard Mask" %}</td>
<th scope="row">{% trans "Wildcard Mask" %}</th>
<td>{{ object.prefix.hostmask }}</td>
</tr>
<tr>
<td>{% trans "Broadcast Address" %}</td>
<th scope="row">{% trans "Broadcast Address" %}</th>
<td>{{ object.prefix.broadcast }}</td>
</tr>
</table>

View File

@ -19,19 +19,19 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Group" %}</td>
<th scope="row">{% trans "Group" %}</th>
<td>{{ object.group|linkify|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Name" %}</td>
<th scope="row">{% trans "Name" %}</th>
<td>{{ object.name }}</td>
</tr>
<tr>
<td>{% trans "Title" %}</td>
<th scope="row">{% trans "Title" %}</th>
<td>{{ object.title|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Phone" %}</td>
<th scope="row">{% trans "Phone" %}</th>
<td>
{% if object.phone %}
<a href="tel:{{ object.phone }}">{{ object.phone }}</a>
@ -41,7 +41,7 @@
</td>
</tr>
<tr>
<td>{% trans "Email" %}</td>
<th scope="row">{% trans "Email" %}</th>
<td>
{% if object.email %}
<a href="mailto:{{ object.email }}">{{ object.email }}</a>
@ -51,11 +51,11 @@
</td>
</tr>
<tr>
<td>{% trans "Address" %}</td>
<th scope="row">{% trans "Address" %}</th>
<td>{{ object.address|linebreaksbr|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Link" %}</td>
<th scope="row">{% trans "Link" %}</th>
<td>
{% if object.link %}
<a href="{{ object.link }}">{{ object.link }}</a>

View File

@ -18,11 +18,11 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<td>{% trans "Group" %}</td>
<th scope="row">{% trans "Group" %}</th>
<td>{{ object.group|linkify|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Description" %}</td>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }}</td>
</tr>
</table>

View File

@ -3,27 +3,27 @@
<table class="table table-hover panel-body attr-table">
<tr>
<td>{% trans "Device" %}</td>
<th scope="row">{% trans "Device" %}</th>
<td>{{ interface.device|linkify }}</td>
</tr>
<tr>
<td>{% trans "Interface" %}</td>
<th scope="row">{% trans "Interface" %}</th>
<td>{{ interface|linkify }}</td>
</tr>
<tr>
<td>{% trans "Type" %}</td>
<th scope="row">{% trans "Type" %}</th>
<td>
{{ interface.get_type_display }}
</td>
</tr>
<tr>
<td>{% trans "Role" %}</td>
<th scope="row">{% trans "Role" %}</th>
<td>
{{ interface.get_rf_role_display|placeholder }}
</td>
</tr>
<tr>
<td>{% trans "Channel" %}</td>
<th scope="row">{% trans "Channel" %}</th>
<td>
{{ interface.get_rf_channel_display|placeholder }}
</td>

View File

@ -16,11 +16,11 @@
<td>{{ object.ssid }}</td>
</tr>
<tr>
<td>{% trans "Group" %}</td>
<th scope="row">{% trans "Group" %}</th>
<td>{{ object.group|linkify|placeholder }}</td>
</tr>
<tr>
<td>{% trans "Status" %}</td>
<th scope="row">{% trans "Status" %}</th>
<td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
</tr>
<tr>