Merge branch 'develop' into feature

This commit is contained in:
jeremystretch
2022-11-30 16:21:20 -05:00
13 changed files with 28 additions and 18 deletions

View File

@@ -265,7 +265,7 @@
<th>Utilization</th>
</tr>
{% for powerport in object.powerports.all %}
{% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoint %}
{% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoints.0 %}
<tr>
<td>{{ powerport }}</td>
<td>{{ utilization.outlet_count }}</td>

View File

@@ -211,7 +211,7 @@
<div class="card">
<h5 class="card-header">Wireless</h5>
<div class="card-body">
{% with peer=object.connected_endpoint %}
{% with peer=object.connected_endpoints.0 %}
<table class="table table-hover">
<thead>
<tr>

View File

@@ -202,7 +202,7 @@
<td>{{ powerfeed|linkify }}</td>
<td>{% badge powerfeed.get_status_display bg_color=powerfeed.get_status_color %}</td>
<td>{% badge powerfeed.get_type_display bg_color=powerfeed.get_type_color %}</td>
{% with power_port=powerfeed.connected_endpoint %}
{% with power_port=powerfeed.connected_endpoints.0 %}
{% if power_port %}
<td>{% utilization_graph power_port.get_power_draw.allocated|percentage:powerfeed.available_power %}</td>
{% else %}