Files
librenms-librenms/includes/html/pages/device/port/arp.inc.php
Tony Murray 12f8bb2040 MAC Vendor OUI use scheduler (#15187)
* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true
Improve scheduler validation handle non-standard install directories and systems without systemd
Add index to table to improve speed and improve mac->vendor lookup speed
Scheduled weekly with random wait to prevent stampeding herd issues for upstream
drop oui update from daily

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true

* Lint fixes and better prefix detection

* update schema file
2023-08-03 19:29:30 -05:00

42 lines
1.5 KiB
PHP

<?php
$no_refresh = true;
?>
<table id="port-arp" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="mac_address" data-formatter="tooltip">MAC address</th>
<th data-column-id="mac_oui" data-sortable="false" data-width="" data-visible="<?php echo \LibreNMS\Config::get('mac_oui.enabled') ? 'true' : 'false' ?>" data-formatter="tooltip">Vendor</th>
<th data-column-id="ipv4_address" data-formatter="tooltip">IPv4 address</th>
<th data-column-id="remote_device" data-sortable="false">Remote device</th>
<th data-column-id="remote_interface" data-sortable="false">Remote interface</th>
</tr>
</thead>
</table>
<script>
var grid = $("#port-arp").bootgrid({
ajax: true,
rowCount: [50, 100, 250, -1],
post: function ()
{
return {
id: "arp-search",
port_id: "<?php echo $port['port_id']; ?>"
};
},
formatters: {
"tooltip": function (column, row) {
var value = row[column.id];
var vendor = '';
if (column.id == 'mac_address' && ((vendor = row['mac_oui']) != '' )) {
return "<span title=\'" + value + " (" + vendor + ")\' data-toggle=\'tooltip\'>" + value + "</span>";
}
return "<span title=\'" + value + "\' data-toggle=\'tooltip\'>" + value + "</span>";
},
},
url: "ajax_table.php"
});
</script>