#524 - Added power utilization graphs to power feeds, devices, and racks

This commit is contained in:
John Anderson
2019-06-16 06:11:32 -04:00
parent 8b3ec625f6
commit 2eeffce924
7 changed files with 102 additions and 8 deletions

View File

@@ -351,6 +351,7 @@
<th>Outlets</th>
<th>Allocated/Max (W)</th>
<th>Available (VA)</th>
<th>Utilization (Allocated)</th>
</tr>
{% for pp in power_ports %}
{% for leg in pp.get_power_stats %}
@@ -363,6 +364,7 @@
<td>{{ leg.outlets|placeholder }}</td>
<td>{{ leg.allocated_draw_total }} / {{ leg.maximum_draw_total }}</td>
<td>{{ leg.available_power }}</td>
<td>{% utilization_graph leg.allocated_utilization %}</td>
</tr>
{% endfor %}
{% endfor %}

View File

@@ -138,6 +138,29 @@
</table>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Power Utilization</strong>
</div>
<table class="table table-hover panel-body">
<tr>
<th>Outlets</th>
<th>Allocated/Max (W)</th>
<th>Available (VA)</th>
<th>Utilization (Allocated)</th>
</tr>
{% for leg in powerfeed.get_power_stats %}
<tr>
<td>{{ leg.outlets|placeholder }}</td>
<td>{{ leg.allocated_draw_total }} / {{ leg.maximum_draw_total }}</td>
<td>{{ leg.available_power }}</td>
<td>{% utilization_graph leg.allocated_utilization %}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="col-md-5">
</div>
</div>

View File

@@ -207,6 +207,7 @@
<th>Feed</th>
<th>Status</th>
<th>Type</th>
<th>Utilization</th>
</tr>
{% for powerfeed in power_feeds %}
<tr>
@@ -222,6 +223,7 @@
<td>
<span class="label label-{{ powerfeed.get_type_class }}">{{ powerfeed.get_type_display }}</span>
</td>
<td>{% utilization_graph powerfeed.get_power_stats.0.allocated_utilization %}</td>
</tr>
{% endfor %}
</table>