瀏覽代碼

Fixes #2150: Fix display of LLDP neighbors when interface name contains a colon

Jeremy Stretch 7 年之前
父節點
當前提交
0af6df3121
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      netbox/templates/dcim/device_lldp_neighbors.html

+ 1 - 1
netbox/templates/dcim/device_lldp_neighbors.html

@@ -53,7 +53,7 @@ $(document).ready(function() {
         success: function(json) {
             $.each(json['get_lldp_neighbors'], function(iface, neighbors) {
                 var neighbor = neighbors[0];
-                var row = $('#' + iface.split(".")[0].replace(/(\/)/g, "\\$1"));
+                var row = $('#' + iface.split(".")[0].replace(/([\/:])/g, "\\$1"));
 
                 // Glean configured hostnames/interfaces from the DOM
                 var configured_device = row.children('td.configured_device').attr('data');