1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#10460: Fix PowerFeed details

This commit is contained in:
jeremystretch
2022-10-04 14:36:14 -04:00
parent eef5cefb5d
commit 53f5f46037

View File

@@ -41,8 +41,8 @@
<tr>
<th scope="row">Connected Device</th>
<td>
{% if object.connected_endpoint %}
{{ object.connected_endpoint.device|linkify }} ({{ object.connected_endpoint }})
{% if object.connected_endpoints %}
{{ object.connected_endpoints.0.device|linkify }} ({{ object.connected_endpoints.0|linkify:"name" }})
{% else %}
{{ ''|placeholder }}
{% endif %}
@@ -50,7 +50,7 @@
</tr>
<tr>
<th scope="row">Utilization (Allocated)</th>
{% with utilization=object.connected_endpoint.get_power_draw %}
{% with utilization=object.connected_endpoints.0.get_power_draw %}
{% if utilization %}
<td>
{{ utilization.allocated }}VA / {{ object.available_power }}VA