Просмотр исходного кода

Fixes #9758: Display parent object of connected termination

jeremystretch 3 лет назад
Родитель
Сommit
e523006ec3
2 измененных файлов с 5 добавлено и 0 удалено
  1. 1 0
      docs/release-notes/version-3.3.md
  2. 4 0
      netbox/dcim/tables/template_code.py

+ 1 - 0
docs/release-notes/version-3.3.md

@@ -99,6 +99,7 @@ Custom field UI visibility has no impact on API operation.
 
 ### Bug Fixes (from Beta2)
 
+* [#9758](https://github.com/netbox-community/netbox/issues/9758) - Display parent object of connected termination
 * [#9900](https://github.com/netbox-community/netbox/issues/9900) - Pre-populate site & rack fields for cable connection form
 * [#9938](https://github.com/netbox-community/netbox/issues/9938) - Exclude virtual interfaces from terminations list when connecting a cable
 * [#9939](https://github.com/netbox-community/netbox/issues/9939) - Fix list of next nodes for split paths under trace view

+ 4 - 0
netbox/dcim/tables/template_code.py

@@ -1,5 +1,9 @@
 LINKTERMINATION = """
 {% for termination in value %}
+  {% if termination.parent_object %}
+    <a href="{{ termination.parent_object.get_absolute_url }}">{{ termination.parent_object }}</a>
+    <i class="mdi mdi-chevron-right"></i>
+  {% endif %}
   <a href="{{ termination.get_absolute_url }}">{{ termination }}</a>{% if not forloop.last %},{% endif %}
 {% empty %}
   {{ ''|placeholder }}