1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
2020-04-15 17:09:04 -04:00

69 lines
2.8 KiB
HTML

{% extends 'base.html' %}
{% load helpers %}
{% block header %}
<h1>{% block title %}Cable Trace for {{ obj }}{% endblock %}</h1>
{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-4 col-md-offset-1 text-center">
<h4>Near End</h4>
</div>
<div class="col-md-3 text-center">
{% if total_length %}<h5>Total length: {{ total_length|floatformat:"-2" }} Meters<h5>{% endif %}
</div>
<div class="col-md-4 text-center">
<h4>Far End</h4>
</div>
</div>
{% for near_end, cable, far_end in trace %}
<div class="row">
<div class="col-md-1 text-right">
<h3>{{ forloop.counter }}</h3>
</div>
<div class="col-md-4">
{% include 'dcim/inc/cable_trace_end.html' with end=near_end %}
</div>
<div class="col-md-3 text-center">
{% if cable %}
<h4>
<a href="{% url 'dcim:cable' pk=cable.pk %}">
{% if cable.label %}<code>{{ cable.label }}</code>{% else %}Cable #{{ cable.pk }}{% endif %}
</a>
</h4>
<p><span class="label label-{{ cable.get_status_class }}">{{ cable.get_status_display }}</span></p>
<p>{{ cable.get_type_display|default:"" }}</p>
{% if cable.length %}{{ cable.length }} {{ cable.get_length_unit_display }}{% endif %}
{% if cable.color %}
<span class="label color-block center-block" style="background-color: #{{ cable.color }}">&nbsp;</span>
{% endif %}
{% else %}
<h4 class="text-muted">No Cable</h4>
{% endif %}
</div>
<div class="col-md-4">
{% if far_end %}
{% include 'dcim/inc/cable_trace_end.html' with end=far_end %}
{% endif %}
</div>
</div>
{% if not forloop.last %}<hr />{% endif %}
{% endfor %}
<div class="row">
<div class="col-md-11 col-md-offset-1">
{% if split_ends %}
<h3 class="text-danger text-center"><i class="fa fa-warning"></i> Trace Split</h3>
<p>Select a termination to continue:</p>
<ul>
{% for termination in split_ends %}
<li><a href="{% url 'dcim:frontport_trace' pk=termination.pk %}">{{ termination.parent }} / {{ termination }}</a></li>
{% endfor %}
</ul>
{% else %}
<h3 class="text-success text-center">Trace completed!</h3>
{% endif %}
</div>
</div>
{% endblock %}