{% extends 'base.html' %} {% load helpers %} {% block header %}

{% block title %}Cable Trace for {{ object|meta:"verbose_name"|bettertitle }} {{ object }}{% endblock %}

{% endblock %} {% block content %}
{% with traced_path=path.origin.trace %} {% for near_end, cable, far_end in traced_path %} {# Near end #} {% if near_end.device %} {% 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/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 %} {% endif %} {# Cable #} {% if cable %} {% include 'dcim/trace/cable.html' %} {% endif %} {# Far end #} {% if far_end.device %} {% include 'dcim/trace/termination.html' with termination=far_end %} {% if forloop.last %} {% include 'dcim/trace/device.html' with device=far_end.device %} {% endif %} {% elif far_end.power_panel %} {% 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 %} {% include 'dcim/trace/circuit.html' with circuit=far_end.circuit %} {% endif %} {% endif %} {% if forloop.last %} {% 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" }} Meters / {{ total_length|meters_to_feet|floatformat:"-2" }} Feet {% else %} N/A {% endif %}
{% endif %} {% endif %} {% endfor %} {% endwith %}
Related Paths
{% for cablepath in related_paths %} {% empty %} {% endfor %}
Origin Destination Segments
{{ cablepath.origin.parent }} / {{ cablepath.origin }} {% if cablepath.destination %} {{ cablepath.destination }} ({{ cablepath.destination.parent }}) {% else %} Incomplete {% endif %} {{ cablepath.segment_count }}
None found
{% endblock %}