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

Moved circuit speed humanization to a template tag

This commit is contained in:
Jeremy Stretch
2017-08-29 22:42:06 -04:00
parent ecdf66c454
commit ae231b1d1b
4 changed files with 27 additions and 32 deletions

View File

@@ -88,7 +88,7 @@
<td>Commit Rate</td>
<td>
{% if circuit.commit_rate %}
{{ circuit.commit_rate_human }}
{{ circuit.commit_rate|humanize_speed }}
{% else %}
<span class="text-muted">N/A</span>
{% endif %}

View File

@@ -1,3 +1,5 @@
{% load helpers %}
<div class="panel panel-default">
<div class="panel-heading">
<div class="pull-right">
@@ -49,10 +51,10 @@
<td>Speed</td>
<td>
{% if termination.upstream_speed %}
<i class="fa fa-arrow-down" title="Downstream"></i> {{ termination.port_speed_human }} &nbsp;
<i class="fa fa-arrow-up" title="Upstream"></i> {{ termination.upstream_speed_human }}
<i class="fa fa-arrow-down" title="Downstream"></i> {{ termination.port_speed|humanize_speed }} &nbsp;
<i class="fa fa-arrow-up" title="Upstream"></i> {{ termination.upstream_speed|humanize_speed }}
{% else %}
{{ termination.port_speed_human }}
{{ termination.port_speed|humanize_speed }}
{% endif %}
</td>
</tr>