1<?php 2$no_refresh = true; 3?> 4<table id="ports-arp" class="table table-condensed table-hover table-striped"> 5 <thead> 6 <tr> 7 <th data-column-id="interface">Port</th> 8 <th data-column-id="mac_address" data-formatter="tooltip">MAC address</th> 9<?php 10if (\LibreNMS\Config::get('mac_oui.enabled') === true) { 11 echo ' <th data-column-id="mac_oui" data-sortable="false" data-width="150px" data-visible="false" data-formatter="tooltip">Vendor</th>'; 12} 13?> 14 <th data-column-id="ipv4_address" data-formatter="tooltip">IPv4 address</th> 15 <th data-column-id="remote_device" data-sortable="false">Remote device</th> 16 <th data-column-id="remote_interface" data-sortable="false">Remote interface</th> 17 </tr> 18 </thead> 19</table> 20 21<script> 22 23var grid = $("#ports-arp").bootgrid({ 24 ajax: true, 25 rowCount: [50, 100, 250, -1], 26 post: function () 27 { 28 return { 29 id: "arp-search", 30 device_id: "<?php echo $device['device_id']; ?>" 31 }; 32 }, 33 formatters: { 34 "tooltip": function (column, row) { 35 var value = row[column.id]; 36 var vendor = ''; 37 if (column.id == 'mac_address' && ((vendor = row['mac_oui']) != '' )) { 38 return "<span title=\'" + value + " (" + vendor + ")\' data-toggle=\'tooltip\'>" + value + "</span>"; 39 } 40 return "<span title=\'" + value + "\' data-toggle=\'tooltip\'>" + value + "</span>"; 41 }, 42 }, 43 url: "ajax_table.php" 44}); 45</script> 46 47