Index: html/ajax_entitypopup.php =================================================================== --- html/ajax_entitypopup.php (revision 6107) +++ html/ajax_entitypopup.php (working copy) @@ -58,6 +58,21 @@ exit; break; + case "mac": + $url = 'http://api.macvendors.com/' . urlencode($vars['entity_id']); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $response = curl_exec($ch); + if ($response) + { + echo 'Vendor: ' . $response; + } else { + echo 'Not Found'; + } + exit; + break; + default: print_error("Unknown entity type."); exit; Index: html/includes/print/arptable.inc.php =================================================================== --- html/includes/print/arptable.inc.php (revision 6107) +++ html/includes/print/arptable.inc.php (working copy) @@ -119,7 +119,7 @@ if ($arp_host['port_id'] == $entry['port_id']) { $arp_if = 'Self Port'; } $string .= ' <tr>' . PHP_EOL; - $string .= ' <td style="width: 160px;">' . format_mac($entry['mac_address']) . '</td>' . PHP_EOL; + $string .= ' <td style="width: 160px;"><a href="#" class="entity-popup" data-eid="' . format_mac($entry['mac_address']) . '" data-etype="mac">' . format_mac($entry['mac_address']) . '</a></td>' . PHP_EOL; $string .= ' <td style="width: 140px;">' . $ip_address . '</td>' . PHP_EOL; if ($list['device']) { Index: html/includes/print/dot1xtable.inc.php =================================================================== --- html/includes/print/dot1xtable.inc.php (revision 6107) +++ html/includes/print/dot1xtable.inc.php (working copy) @@ -108,7 +108,7 @@ $ap_id = $entry['accesspoint_id']; $interface = $aps_sorted_db[$ap_id]['name']; $string .= ' <tr>' . PHP_EOL; - $string .= ' <td style="width: 140px;">' . format_mac($entry['session_mac']) . '</td>' . PHP_EOL; + $string .= ' <td style="width: 140px;"><a href="#" class="entity-popup" data-eid="' . format_mac($entry['session_mac']) . '" data-etype="mac">' . format_mac($entry['session_mac']) . '</a></td>' . PHP_EOL; $string .= ' <td style="width: 140px;">' . $entry['ipv4_addr'] . '</td>' . PHP_EOL; $string .= ' <td style="white-space: nowrap;">' . $entry['username'] . '</td>' . PHP_EOL; $string .= ' <td style="width: 140px;">' . $entry['ssid'] . '</td>' . PHP_EOL; Index: html/includes/print/fdbtable.inc.php =================================================================== --- html/includes/print/fdbtable.inc.php (revision 6107) +++ html/includes/print/fdbtable.inc.php (working copy) @@ -104,7 +104,7 @@ humanize_port($entry); $string .= ' <tr>' . PHP_EOL; - $string .= ' <td style="width: 160px;">' . format_mac($entry['mac_address']) . '</td>' . PHP_EOL; + $string .= ' <td style="width: 160px;"><a href="#" class="entity-popup" data-eid="' . format_mac($entry['mac_address']) . '" data-etype="mac">' . format_mac($entry['mac_address']) . '</a></td>' . PHP_EOL; if ($list['device']) { $dev = device_by_id_cache($entry['device_id']); Index: html/includes/print/mac_addresses.inc.php =================================================================== --- html/includes/print/mac_addresses.inc.php (revision 6107) +++ html/includes/print/mac_addresses.inc.php (working copy) @@ -104,7 +104,7 @@ $port_error = generate_port_link($entry, '<span class="label label-important">Errors</span>', 'port_errors'); } $string .= ' <td class="entity">' . generate_port_link($entry, short_ifname($entry['label'])) . ' ' . $port_error . '</td>' . PHP_EOL; - $string .= ' <td style="width: 160px;">' . $entry['human_mac'] . '</td>' . PHP_EOL; + $string .= ' <td style="width: 160px;"><a href="#" class="entity-popup" data-eid="' . $entry['human_mac'] . '" data-etype="mac">' . $entry['human_mac'] . '</a></td>' . PHP_EOL; $string .= ' <td>' . $entry['ifAlias'] . '</td>' . PHP_EOL; $string .= ' </tr>' . PHP_EOL; }