Quellcode durchsuchen

Fixes #5184: Fix missing Power Utilization

kobayashi vor 5 Jahren
Ursprung
Commit
5c8694ad65
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 1 0
      docs/release-notes/version-2.9.md
  2. 2 2
      netbox/templates/dcim/device.html

+ 1 - 0
docs/release-notes/version-2.9.md

@@ -6,6 +6,7 @@
 
 
 * [#5174](https://github.com/netbox-community/netbox/issues/5174) - Ensure consistent alignment of rack elevations
 * [#5174](https://github.com/netbox-community/netbox/issues/5174) - Ensure consistent alignment of rack elevations
 * [#5175](https://github.com/netbox-community/netbox/issues/5175) - Fix toggling of rack elevation order
 * [#5175](https://github.com/netbox-community/netbox/issues/5175) - Fix toggling of rack elevation order
+* [#5184](https://github.com/netbox-community/netbox/issues/5184) - Fix missing Power Utilization
 
 
 ---
 ---
 
 

+ 2 - 2
netbox/templates/dcim/device.html

@@ -326,7 +326,7 @@
             {% plugin_left_page device %}
             {% plugin_left_page device %}
         </div>
         </div>
         <div class="col-md-6">
         <div class="col-md-6">
-            {% if power_ports and poweroutlets %}
+            {% if powerports and poweroutlets %}
                 <div class="panel panel-default">
                 <div class="panel panel-default">
                     <div class="panel-heading">
                     <div class="panel-heading">
                         <strong>Power Utilization</strong>
                         <strong>Power Utilization</strong>
@@ -339,7 +339,7 @@
                             <th>Available</th>
                             <th>Available</th>
                             <th>Utilization</th>
                             <th>Utilization</th>
                         </tr>
                         </tr>
-                        {% for pp in power_ports %}
+                        {% for pp in powerports %}
                             {% with utilization=pp.get_power_draw powerfeed=pp.connected_endpoint %}
                             {% with utilization=pp.get_power_draw powerfeed=pp.connected_endpoint %}
                                 <tr>
                                 <tr>
                                     <td>{{ pp }}</td>
                                     <td>{{ pp }}</td>