mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-09 00:58:16 -06:00
Fixed three-phase available power divide by zero
This commit is contained in:
parent
7531efcfec
commit
e3aef95662
@ -378,10 +378,15 @@
|
|||||||
<td style="padding-left: 20px">Leg {{ leg.name }}</td>
|
<td style="padding-left: 20px">Leg {{ leg.name }}</td>
|
||||||
<td>{{ leg.outlet_count }}</td>
|
<td>{{ leg.outlet_count }}</td>
|
||||||
<td>{{ leg.allocated }}VA</td>
|
<td>{{ leg.allocated }}VA</td>
|
||||||
<td>{{ powerfeed.available_power|divide:3 }}VA</td>
|
{% if powerfeed.available_power %}
|
||||||
{% with phase_available=powerfeed.available_power|divide:3 %}
|
<td>{{ powerfeed.available_power|divide:3 }}VA</td>
|
||||||
<td>{% utilization_graph leg.allocated|percentage:phase_available %}</td>
|
{% with phase_available=powerfeed.available_power|divide:3 %}
|
||||||
{% endwith %}
|
<td>{% utilization_graph leg.allocated|percentage:phase_available %}</td>
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
<td class="text-muted">—</td>
|
||||||
|
<td class="text-muted">—</td>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
Loading…
Reference in New Issue
Block a user