mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'feature' of github.com:netbox-community/netbox into feature
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<th scope="row">Length</th>
|
||||
<td>
|
||||
{% if object.length %}
|
||||
{{ object.length }} {{ object.get_length_unit_display }}
|
||||
{{ object.length|floatformat }} {{ object.get_length_unit_display }}
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<span class="badge bg-secondary">{{ cable.get_type_display|default:"" }}</span>
|
||||
{% endif %}
|
||||
{% if cable.length %}
|
||||
({{ cable.length }} {{ cable.get_length_unit_display }})<br />
|
||||
({{ cable.length|floatformat }} {{ cable.get_length_unit_display }})<br />
|
||||
{% endif %}
|
||||
<span class="badge bg-{{ cable.get_status_class }}">{{ cable.get_status_display }}</span><br />
|
||||
{% for tag in cable.tags.all %}
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<div class="col col-md-5">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Prefix
|
||||
Prefix
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
@@ -20,7 +20,6 @@
|
||||
<span class="badge bg-info">Not a Pool</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Family</th>
|
||||
@@ -101,9 +100,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Utilization</th>
|
||||
<td>{% utilization_graph object.get_utilization %}</td>
|
||||
<td>
|
||||
{% if object.mark_utilized %}
|
||||
{% utilization_graph 100 warning_threshold=0 danger_threshold=0 %}
|
||||
<small>(Marked fully utilized)</small>
|
||||
{% else %}
|
||||
{% utilization_graph object.get_utilization %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' %}
|
||||
|
||||
@@ -1,42 +1,18 @@
|
||||
{% if utilization == 0 %}
|
||||
<div class="progress align-items-center justify-content-center">
|
||||
<div class="progress align-items-center justify-content-center">
|
||||
<span class="w-100 text-center">{{ utilization }}%</span>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="progress">
|
||||
{% if utilization >= danger_threshold %}
|
||||
<div
|
||||
aria-valuemin="0"
|
||||
role="progressbar"
|
||||
aria-valuemax="100"
|
||||
class="progress-bar bg-danger"
|
||||
aria-valuenow="{{ utilization }}"
|
||||
style="width: {{ utilization }}%;"
|
||||
<div class="progress">
|
||||
<div
|
||||
role="progressbar"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
aria-valuenow="{{ utilization }}"
|
||||
class="progress-bar {{ bar_class }}"
|
||||
style="min-width: 8%; width: {{ utilization }}%;"
|
||||
>
|
||||
{{ utilization }}%
|
||||
{{ utilization }}%
|
||||
</div>
|
||||
{% elif utilization >= warning_threshold %}
|
||||
<div
|
||||
aria-valuemin="0"
|
||||
role="progressbar"
|
||||
aria-valuemax="100"
|
||||
aria-valuenow="{{ utilization }}"
|
||||
style="width: {{ utilization }}%;"
|
||||
class="progress-bar bg-warning"
|
||||
>
|
||||
{{ utilization }}%
|
||||
</div>
|
||||
{% else %}
|
||||
<div
|
||||
aria-valuemin="0"
|
||||
role="progressbar"
|
||||
aria-valuemax="100"
|
||||
class="progress-bar bg-success"
|
||||
aria-valuenow="{{ utilization }}"
|
||||
style="min-width: 8%;width: {{ utilization }}%;"
|
||||
>
|
||||
{{ utilization }}%
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user