+
{% with traced_path=path.origin.trace %}
{% for near_end, cable, far_end in traced_path %}
@@ -16,7 +16,8 @@
{% include 'dcim/trace/device.html' with device=near_end.device %}
{% include 'dcim/trace/termination.html' with termination=near_end %}
{% elif near_end.power_panel %}
- {% include 'dcim/trace/powerfeed.html' with powerfeed=near_end %}
+ {% include 'dcim/trace/powerpanel.html' with powerpanel=near_end.power_panel %}
+ {% include 'dcim/trace/termination.html' with termination=far_end%}
{% elif near_end.circuit %}
{% include 'dcim/trace/circuit.html' with circuit=near_end.circuit %}
{% include 'dcim/trace/termination.html' with termination=near_end %}
@@ -27,9 +28,7 @@
{# Cable #}
{% if cable %}
-
- {% include 'dcim/trace/cable.html' %}
-
+ {% include 'dcim/trace/cable.html' %}
{% endif %}
{# Far end #}
@@ -39,7 +38,8 @@
{% include 'dcim/trace/device.html' with device=far_end.device %}
{% endif %}
{% elif far_end.power_panel %}
- {% include 'dcim/trace/powerfeed.html' with powerfeed=far_end %}
+ {% include 'dcim/trace/termination.html' with termination=far_end %}
+ {% include 'dcim/trace/powerpanel.html' with powerpanel=far_end.power_panel %}
{% elif far_end.circuit %}
{% include 'dcim/trace/termination.html' with termination=far_end %}
{% if forloop.last %}
@@ -47,15 +47,17 @@
{% endif %}
{% endif %}
- {% if forloop.last and far_end %}
-
-
-
Trace completed!
-
Total segments: {{ traced_path|length }}
+ {% if forloop.last %}
+
+
Trace completed
+ Total segments: {{ traced_path|length }}
+ Total length:
{% if total_length %}
- Total length: {{ total_length|floatformat:"-2" }} Meters
+ {{ total_length|floatformat:"-2" }} Meters
+ {% else %}
+ N/A
{% endif %}
-
+
{% endif %}
diff --git a/netbox/templates/dcim/trace/cable.html b/netbox/templates/dcim/trace/cable.html
index e7da2fb9e..cd1fd9398 100644
--- a/netbox/templates/dcim/trace/cable.html
+++ b/netbox/templates/dcim/trace/cable.html
@@ -1,15 +1,15 @@
-
-
-
+
+
{% if cable.label %}{{ cable.label }}
{% else %}Cable #{{ cable.pk }}{% endif %}
-
- {{ cable.get_status_display }}
- {{ cable.get_type_display|default:"" }}
- {% if cable.length %}{{ cable.length }} {{ cable.get_length_unit_display }}{% endif %}
- {% if cable.color %}
-
+
+ {% if cable.type %}
+ {{ cable.get_type_display|default:"" }}
+ {% if cable.length %}
+ ({{ cable.length }} {{ cable.get_length_unit_display }})
+ {% endif %}
+
{% endif %}
-
+
{{ cable.get_status_display }}
diff --git a/netbox/templates/dcim/trace/circuit.html b/netbox/templates/dcim/trace/circuit.html
index ef1ed05bc..70e191dd2 100644
--- a/netbox/templates/dcim/trace/circuit.html
+++ b/netbox/templates/dcim/trace/circuit.html
@@ -1,6 +1,5 @@
-
-
+
diff --git a/netbox/templates/dcim/trace/device.html b/netbox/templates/dcim/trace/device.html
index c3ed109d7..c3696e786 100644
--- a/netbox/templates/dcim/trace/device.html
+++ b/netbox/templates/dcim/trace/device.html
@@ -1,9 +1,8 @@
-
-
+
diff --git a/netbox/templates/dcim/trace/powerfeed.html b/netbox/templates/dcim/trace/powerfeed.html
deleted file mode 100644
index a439aff27..000000000
--- a/netbox/templates/dcim/trace/powerfeed.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/netbox/templates/dcim/trace/powerpanel.html b/netbox/templates/dcim/trace/powerpanel.html
new file mode 100644
index 000000000..f5b6230a7
--- /dev/null
+++ b/netbox/templates/dcim/trace/powerpanel.html
@@ -0,0 +1,5 @@
+
diff --git a/netbox/templates/dcim/trace/termination.html b/netbox/templates/dcim/trace/termination.html
index dedb562ea..45036ebf0 100644
--- a/netbox/templates/dcim/trace/termination.html
+++ b/netbox/templates/dcim/trace/termination.html
@@ -1,9 +1,8 @@
{% load helpers %}
-
-
- {{ termination|meta:"verbose_name"|bettertitle }}
{{ termination }}
- {% if termination.type %}
-
{{ termination.get_type_display }}
- {% endif %}
-
-
\ No newline at end of file
+
+
{{ termination }}
+ {{ termination|meta:"verbose_name"|bettertitle }}
+ {% if termination.type %}
+ ({{ termination.get_type_display }})
+ {% endif %}
+