From 12476036cd3dc5990d2a6c9973ed9ccc758c377d Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 25 Jul 2022 09:55:20 -0400 Subject: [PATCH 1/2] Changelog for #9794, #9818 --- docs/release-notes/version-3.3.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 4b3f1dcb2..ad9ce1a0e 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -103,6 +103,8 @@ Custom field UI visibility has no impact on API operation. * [#9730](https://github.com/netbox-community/netbox/issues/9730) - Fix validation error when creating a new cable via UI form * [#9733](https://github.com/netbox-community/netbox/issues/9733) - Handle split paths during trace when fanning out to front ports with differing cables * [#9765](https://github.com/netbox-community/netbox/issues/9765) - Report correct segment count under cable trace UI view +* [#9794](https://github.com/netbox-community/netbox/issues/9794) - Fix link to connect a rear port to a circuit termination +* [#9818](https://github.com/netbox-community/netbox/issues/9818) - Fix circuit side selection when connecting a cable to a circuit termination ### Plugins API From 2583abc39d4eafdca645bc18110140f1e350c7df Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 25 Jul 2022 11:34:16 -0400 Subject: [PATCH 2/2] Fix null cable termination representation --- .../templates/dcim/inc/cable_termination.html | 118 +++++++++--------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/netbox/templates/dcim/inc/cable_termination.html b/netbox/templates/dcim/inc/cable_termination.html index 9d1c43bdd..ced9bda50 100644 --- a/netbox/templates/dcim/inc/cable_termination.html +++ b/netbox/templates/dcim/inc/cable_termination.html @@ -1,58 +1,62 @@ {% load helpers %} - - {% if terminations.0.device %} - {# Device component #} - - - - - - - - - - - - - - - - - {% elif terminations.0.power_panel %} - {# Power feed #} - - - - - - - - - - - - - {% else %} - {# Circuit termination #} - - - - - - - - - {% endif %} -
Site{{ terminations.0.device.site|linkify }}
Rack{{ terminations.0.device.rack|linkify|placeholder }}
Device{{ terminations.0.device|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} - {% for term in terminations %} - {{ term|linkify }}{% if not forloop.last %},{% endif %} - {% endfor %} -
Site{{ terminations.0.power_panel.site|linkify }}
Power Panel{{ terminations.0.power_panel|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} - {% for term in terminations %} - {{ term|linkify }}{% if not forloop.last %},{% endif %} - {% endfor %} -
Provider{{ terminations.0.circuit.provider|linkify }}
Circuit - {% for term in terminations %} - {{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %} - {% endfor %} -
+{% if terminations.0 %} + + {% if terminations.0.device %} + {# Device component #} + + + + + + + + + + + + + + + + + {% elif terminations.0.power_panel %} + {# Power feed #} + + + + + + + + + + + + + {% elif terminations.0.circuit %} + {# Circuit termination #} + + + + + + + + + {% endif %} +
Site{{ terminations.0.device.site|linkify }}
Rack{{ terminations.0.device.rack|linkify|placeholder }}
Device{{ terminations.0.device|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} + {% for term in terminations %} + {{ term|linkify }}{% if not forloop.last %},{% endif %} + {% endfor %} +
Site{{ terminations.0.power_panel.site|linkify }}
Power Panel{{ terminations.0.power_panel|linkify }}
{{ terminations.0|meta:"verbose_name"|capfirst }} + {% for term in terminations %} + {{ term|linkify }}{% if not forloop.last %},{% endif %} + {% endfor %} +
Provider{{ terminations.0.circuit.provider|linkify }}
Circuit + {% for term in terminations %} + {{ term.circuit|linkify }} ({{ term }}){% if not forloop.last %},{% endif %} + {% endfor %} +
+{% else %} + No termination +{% endif %}