Browse Source

Merge branch 'temp' into feature

jeremystretch 3 years ago
parent
commit
7631722f97
2 changed files with 63 additions and 57 deletions
  1. 2 0
      docs/release-notes/version-3.3.md
  2. 61 57
      netbox/templates/dcim/inc/cable_termination.html

+ 2 - 0
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
 * [#9844](https://github.com/netbox-community/netbox/issues/9844) - Fix interface api request when creating/editing L2VPN termination
 
 ### Plugins API

+ 61 - 57
netbox/templates/dcim/inc/cable_termination.html

@@ -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 %}