1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Created a template tag for displaying utilization graphs

This commit is contained in:
Jeremy Stretch
2016-07-20 13:56:17 -04:00
parent 65fb10059a
commit e1fc78bc44
4 changed files with 23 additions and 18 deletions

View File

@@ -0,0 +1,7 @@
<div class="progress text-center">
{% if utilization < 30 %}<span style="font-size: 12px;">{{ utilization }}%</span>{% endif %}
<div class="progress-bar progress-bar-{% if utilization >= danger_threshold %}danger{% elif utilization >= warning_threshold %}warning{% else %}success{% endif %}"
role="progressbar" aria-valuenow="{{ utilization }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ utilization }}%">
{% if utilization >= 30 %}{{ utilization }}%{% endif %}
</div>
</div>