mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-27 07:37:45 -06:00
#524 - Added power utilization graphs to power feeds, devices, and racks
This commit is contained in:
@@ -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 %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user