mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Reorganize & clean up templatetag templates
This commit is contained in:
21
netbox/utilities/templates/helpers/utilization_graph.html
Normal file
21
netbox/utilities/templates/helpers/utilization_graph.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% if utilization == 0 %}
|
||||
<div class="progress align-items-center justify-content-center">
|
||||
<span class="w-100 text-center">{{ utilization }}%</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="progress">
|
||||
<div
|
||||
role="progressbar"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
aria-valuenow="{{ utilization }}"
|
||||
class="progress-bar {{ bar_class }}"
|
||||
style="width: {{ utilization }}%;"
|
||||
>
|
||||
{% if utilization >= 25 %}{{ utilization }}%{% endif %}
|
||||
</div>
|
||||
{% if utilization < 25 %}
|
||||
<span class="ps-1">{{ utilization }}%</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
Reference in New Issue
Block a user