Explorar o código

#6797: Improve utilization graph display for small values

jeremystretch %!s(int64=4) %!d(string=hai) anos
pai
achega
33d40d4253

+ 5 - 2
netbox/templates/utilities/templatetags/utilization_graph.html

@@ -10,9 +10,12 @@
       aria-valuemax="100"
       aria-valuenow="{{ utilization }}"
       class="progress-bar {{ bar_class }}"
-      style="min-width: 8%; width: {{ utilization }}%;"
+      style="width: {{ utilization }}%;"
     >
-      {{ utilization }}%
+      {% if utilization >= 25 %}{{ utilization }}%{% endif %}
     </div>
+    {% if utilization < 25 %}
+      <span class="ps-1">{{ utilization }}%</span>
+    {% endif %}
   </div>
 {% endif %}