From 8a2276e79136d8bac7b212ce1ad7f014ffb0de41 Mon Sep 17 00:00:00 2001 From: kkthxbye-code Date: Mon, 18 Jul 2022 16:17:16 +0200 Subject: [PATCH] Use segment_count for segment count on trace view --- netbox/templates/dcim/cable_trace.html | 72 +++++++++++++------------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/netbox/templates/dcim/cable_trace.html b/netbox/templates/dcim/cable_trace.html index abe13b236..2611686f6 100644 --- a/netbox/templates/dcim/cable_trace.html +++ b/netbox/templates/dcim/cable_trace.html @@ -18,43 +18,41 @@
- {% with traced_path=path.origin.trace %} - {% if path.is_split %} -

Path split!

-

Select a node below to continue:

- - {% else %} -

Trace Completed

- - - - - - - - - -
Total segments{{ traced_path|length }}
Total length - {% if total_length %} - {{ total_length|floatformat:"-2" }}{% if not is_definitive %}+{% endif %} Meters / - {{ total_length|meters_to_feet|floatformat:"-2" }} Feet - {% else %} - N/A - {% endif %} -
- {% endif %} - {% endwith %} + {% if path.is_split %} +

Path split!

+

Select a node below to continue:

+ + {% else %} +

Trace Completed

+ + + + + + + + + +
Total segments{{ path.segment_count }}
Total length + {% if total_length %} + {{ total_length|floatformat:"-2" }}{% if not is_definitive %}+{% endif %} Meters / + {{ total_length|meters_to_feet|floatformat:"-2" }} Feet + {% else %} + N/A + {% endif %} +
+ {% endif %}
{% else %}