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

Fixes: #11079 - Handle cables across multiple rear-port positions (#13337)

* Catch AssertionError's in signals.  Handle accordingly

* Alter cable logic to handle certain additional path types.

* Fix failures and add test

* More tests

* Remove not needed tests, add additional tests

* Finish tests, correct some behaviour

* Add check for mid-span device not allowed condition

* Remove excess import

* Remove logging import

* Remove logging import

* Minor tweaks based on Arthur's feedback

* Update netbox/dcim/tests/test_cablepaths.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/models/cables.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Changes to account for required SVG rendering changes and based on feedback

* More tweaks for cable path checking

* Improve handling of links with multi-terminations

* Improved SVG rendering of multiple rear ports (with positions) per path trace.  Include asymmetric path detection

* Include missing assert to ensure links are same type.

* Clean up tests

* Remove unused objects from tests

* Changes requested to tests and update comments/doctstrings

* Fix parent reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Daniel Sheppard
2023-09-26 13:16:50 -04:00
committed by GitHub
parent 1ad6d94dc3
commit f65744faee
4 changed files with 603 additions and 72 deletions

View File

@@ -23,7 +23,15 @@
</div>
</div>
<div class="trace-end">
{% if path.is_split %}
{% if path.is_split and path.get_asymmetric_nodes %}
<h3 class="text-danger">{% trans "Asymmetric Path" %}!</h3>
<p>{% trans "The nodes below have no links and result in an asymmetric path" %}:</p>
<ul class="text-start">
{% for next_node in path.get_asymmetric_nodes %}
<li class="text-muted">{{ next_node|linkify }}</li>
{% endfor %}
</ul>
{% elif path.is_split %}
<h3 class="text-danger">{% trans "Path split" %}!</h3>
<p>{% trans "Select a node below to continue" %}:</p>
<ul class="text-start">