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

{% block title %}Cable Trace for {{ obj }}{% endblock %}

{% endblock %} {% block content %}
{% for near_end, cable, far_end in 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/powerfeed.html' with powerfeed=near_end %} {% elif near_end.circuit %} {% include 'dcim/trace/circuit.html' with circuit=near_end.circuit %} {% include 'dcim/trace/termination.html' with termination=near_end %} {% else %}

Split Paths!

{# TODO: Present the user with successive paths to choose from #} {% 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/powerfeed.html' with powerfeed=far_end %} {% 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 and far_end %}

Trace completed!

Total segments: {{ path|length }}
{% if total_length %}
Total length: {{ total_length|floatformat:"-2" }} Meters
{% endif %}
{% endif %} {% endfor %}

Related Paths

{% endblock %}