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

Closes #14551: Show assigned tunnel (if any) under interface view

Jeremy Stretch 2 лет назад
Родитель
Сommit
96878cfca6

+ 8 - 4
netbox/templates/dcim/interface.html

@@ -86,6 +86,14 @@
               <th scope="row">{% trans "Transmit power (dBm)" %}</th>
               <td>{{ object.tx_power|placeholder }}</td>
             </tr>
+            <tr>
+              <th scope="row">{% trans "Tunnel" %}</th>
+              <td>{{ object.tunnel_termination.tunnel|linkify|placeholder }}</td>
+            </tr>
+            <tr>
+              <th scope="row">{% trans "L2VPN" %}</th>
+              <td>{{ object.l2vpn_termination.l2vpn|linkify|placeholder }}</td>
+            </tr>
           </table>
         </div>
       </div>
@@ -105,10 +113,6 @@
               <th scope="row">{% trans "LAG" %}</th>
               <td>{{ object.lag|linkify|placeholder }}</td>
             </tr>
-            <tr>
-              <th scope="row">{% trans "L2VPN" %}</th>
-              <td>{{ object.l2vpn_termination.l2vpn|linkify|placeholder }}</td>
-            </tr>
           </table>
         </div>
       </div>

+ 4 - 0
netbox/templates/virtualization/vminterface.html

@@ -66,6 +66,10 @@
                         <th scope="row">{% trans "802.1Q Mode" %}</th>
                         <td>{{ object.get_mode_display|placeholder }}</td>
                     </tr>
+                    <tr>
+                        <th scope="row">{% trans "Tunnel" %}</th>
+                        <td>{{ object.tunnel_termination.tunnel|linkify|placeholder }}</td>
+                    </tr>
                 </table>
             </div>
         </div>