mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Closes #5542: Show cable trace lengths in both meters and feet
This commit is contained in:
parent
fefc623343
commit
5e962719ca
@ -4,6 +4,7 @@
|
||||
|
||||
### Enhancements
|
||||
|
||||
* [#5542](https://github.com/netbox-community/netbox/issues/5542) - Show cable trace lengths in both meters and feet
|
||||
* [#5570](https://github.com/netbox-community/netbox/issues/5570) - Add "management only" filter widget for interfaces list
|
||||
* [#5586](https://github.com/netbox-community/netbox/issues/5586) - Allow filtering virtual chassis by name and master
|
||||
* [#5612](https://github.com/netbox-community/netbox/issues/5612) - Add GG45 and TERA port types, and CAT7a and CAT8 cable types
|
||||
|
@ -69,7 +69,8 @@
|
||||
<h5>Total segments: {{ traced_path|length }}</h5>
|
||||
<h5>Total length:
|
||||
{% if total_length %}
|
||||
{{ total_length|floatformat:"-2" }} Meters
|
||||
{{ total_length|floatformat:"-2" }} Meters /
|
||||
{{ total_length|meters_to_feet|floatformat:"-2" }} Feet
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
|
@ -220,6 +220,14 @@ def as_range(n):
|
||||
return range(n)
|
||||
|
||||
|
||||
@register.filter()
|
||||
def meters_to_feet(n):
|
||||
"""
|
||||
Convert a length from meters to feet.
|
||||
"""
|
||||
return float(n) * 3.28084
|
||||
|
||||
|
||||
#
|
||||
# Tags
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user