mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add device name into the l2 devices page
This commit is contained in:
parent
5ae3bb13ba
commit
fa6d428b13
5 changed files with 24 additions and 6 deletions
|
|
@ -1547,7 +1547,7 @@ end
|
|||
-- Mac Addresses --
|
||||
|
||||
-- A function to give a useful device name
|
||||
function getDeviceName(device_mac, vlan)
|
||||
function getDeviceName(device_mac, vlan, skip_manufacturer)
|
||||
local name = getHostAltName(device_mac)
|
||||
|
||||
if name == device_mac then
|
||||
|
|
@ -1576,7 +1576,7 @@ function getDeviceName(device_mac, vlan)
|
|||
if isEmptyString(name) then
|
||||
local manufacturer = ntop.getMacManufacturer(device_mac)
|
||||
|
||||
if manufacturer ~= nil then
|
||||
if (not skip_manufacturer) and (manufacturer ~= nil) then
|
||||
name = manufacturer.extended
|
||||
else
|
||||
-- last resort
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue