mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Unify host and mac device types
Now the device type is a layer-2 concept and as such is stored into the Mac objects
This commit is contained in:
parent
c4a6ddd3a4
commit
6cdcc0ffac
15 changed files with 112 additions and 129 deletions
|
|
@ -5,6 +5,7 @@
|
|||
dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
require "lua_utils"
|
||||
local discover = require("discover_utils")
|
||||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
||||
|
|
@ -237,10 +238,8 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
print(" ")
|
||||
|
||||
local icon = getOSIcon(value["os"])
|
||||
if(mac ~= nil and trimSpace(getOSIcon(value["os"])) ~= trimSpace(getHostIcon(hosts_stats[key]["mac"]))) then
|
||||
icon = icon.." "..getHostIcon(hosts_stats[key]["mac"])
|
||||
end
|
||||
if(icon == "") then icon = getHostIcon(hosts_stats[key]["ip"].."@"..hosts_stats[key]["vlan"]) end
|
||||
icon = icon .. discover.devtype2icon(hosts_stats[key].device_type)
|
||||
icon = icon:gsub('"',"'")
|
||||
print(icon)
|
||||
|
||||
if(value["dump_host_traffic"] == true) then print(" <i class='fa fa-hdd-o fa-lg'></i>") end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue