mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Fix null cable termination representation
This commit is contained in:
parent
12476036cd
commit
2583abc39d
@ -1,58 +1,62 @@
|
||||
{% load helpers %}
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
{% if terminations.0.device %}
|
||||
{# Device component #}
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>{{ terminations.0.device.site|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rack</td>
|
||||
<td>{{ terminations.0.device.rack|linkify|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Device</td>
|
||||
<td>{{ terminations.0.device|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ terminations.0|meta:"verbose_name"|capfirst }}</td>
|
||||
<td>
|
||||
{% for term in terminations %}
|
||||
{{ term|linkify }}{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% elif terminations.0.power_panel %}
|
||||
{# Power feed #}
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>{{ terminations.0.power_panel.site|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Power Panel</td>
|
||||
<td>{{ terminations.0.power_panel|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ terminations.0|meta:"verbose_name"|capfirst }}</td>
|
||||
<td>
|
||||
{% for term in terminations %}
|
||||
{{ term|linkify }}{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{# Circuit termination #}
|
||||
<tr>
|
||||
<td>Provider</td>
|
||||
<td>{{ terminations.0.circuit.provider|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Circuit</td>
|
||||
<td>
|
||||
{% for term in terminations %}
|
||||
{{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% if terminations.0 %}
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
{% if terminations.0.device %}
|
||||
{# Device component #}
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>{{ terminations.0.device.site|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rack</td>
|
||||
<td>{{ terminations.0.device.rack|linkify|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Device</td>
|
||||
<td>{{ terminations.0.device|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ terminations.0|meta:"verbose_name"|capfirst }}</td>
|
||||
<td>
|
||||
{% for term in terminations %}
|
||||
{{ term|linkify }}{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% elif terminations.0.power_panel %}
|
||||
{# Power feed #}
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>{{ terminations.0.power_panel.site|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Power Panel</td>
|
||||
<td>{{ terminations.0.power_panel|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ terminations.0|meta:"verbose_name"|capfirst }}</td>
|
||||
<td>
|
||||
{% for term in terminations %}
|
||||
{{ term|linkify }}{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% elif terminations.0.circuit %}
|
||||
{# Circuit termination #}
|
||||
<tr>
|
||||
<td>Provider</td>
|
||||
<td>{{ terminations.0.circuit.provider|linkify }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Circuit</td>
|
||||
<td>
|
||||
{% for term in terminations %}
|
||||
{{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% else %}
|
||||
<span class="text-muted">No termination</span>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user