Fix PowerFeed display in cable traces

This commit is contained in:
Jeremy Stretch 2020-10-07 11:33:47 -04:00
parent eaf8d95ce5
commit 85439fd952

View File

@ -10,25 +10,34 @@
/ <a href="{{ end.device.rack.get_absolute_url }}">{{ end.device.rack }}</a> / <a href="{{ end.device.rack.get_absolute_url }}">{{ end.device.rack }}</a>
{% endif %} {% endif %}
</small> </small>
{% else %} {% elif end.circuit %}
<strong><a href="{{ end.circuit.provider.get_absolute_url }}">{{ end.circuit.provider }}</a></strong> <strong><a href="{{ end.circuit.provider.get_absolute_url }}">{{ end.circuit.provider }}</a></strong>
{% elif end.power_panel %}
<strong><a href="{{ end.power_panel.get_absolute_url }}">{{ end.power_panel }}</a></strong><br/>
<small>
<a href="{{ end.power_panel.site.get_absolute_url }}">{{ end.power_panel.site }}</a>
</small>
{% endif %} {% endif %}
</div> </div>
<div class="panel-body text-center"> <div class="panel-body text-center">
{% if end.device %} {% if end.device %}
{# Device component #} {# Device component #}
{% with model=end|meta:"verbose_name" %} {% with model=end|meta:"verbose_name" %}
<strong>{{ model|bettertitle }} {{ end }}</strong><br /> <strong><a href="{{ end.get_absolute_url }}">{{ model|bettertitle }} {{ end }}</a></strong><br />
{% if model == 'interface' %} {% if model == 'interface' or model == 'front port' or model == 'rear port' %}
{{ end.get_type_display }}
{% elif model == 'front port' or model == 'rear port' %}
{{ end.get_type_display }} {{ end.get_type_display }}
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% else %} {% elif end.circuit %}
{# Circuit termination #} {# CircuitTermination #}
<strong><a href="{{ end.circuit.get_absolute_url }}">{{ end.circuit }}</a></strong><br/> <strong><a href="{{ end.circuit.get_absolute_url }}">{{ end.circuit }}</a></strong><br/>
{{ end }} {{ end }}
{% elif end.power_panel %}
{# PowerFeed #}
<strong><a href="{{ end.get_absolute_url }}">Power Feed {{ end }}</a></strong><br />
{% if end.rack %}
<a href="{{ end.rack.get_absolute_url }}">{{ end.rack }}</a>
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>