mirror of
https://github.com/ntop/ntopng.git
synced 2026-08-31 01:44:46 +00:00
Unify os (#2755)
* Unify OS information. Now OS information is only stored into the Host. The lua uses numeric IDs to handle OS. * Fix network discovery OS * Show OS detail into the host details page
This commit is contained in:
parent
81a9963e46
commit
c829c4c3c3
27 changed files with 273 additions and 248 deletions
|
|
@ -35,7 +35,7 @@ local network = _GET["network"]
|
|||
local cidr = _GET["network_cidr"]
|
||||
local pool = _GET["pool"]
|
||||
local country = _GET["country"]
|
||||
local os_ = _GET["os"]
|
||||
local os_ = tonumber(_GET["os"])
|
||||
local mac = _GET["mac"]
|
||||
local top_hidden = ternary(_GET["top_hidden"] == "1", true, nil)
|
||||
|
||||
|
|
@ -223,10 +223,10 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
|
||||
local column_ip = "<A HREF='"..url.."' "..
|
||||
ternary((have_nedge and drop_traffic), "style='text-decoration: line-through'", "")..
|
||||
">"..mapOS2Icon(stripVlan(key)).." </A>"
|
||||
">".. stripVlan(key) .." </A>"
|
||||
|
||||
if((value.operatingSystem ~= 0) and (value["os"] == "")) then
|
||||
column_ip = column_ip .. " "..getOperatingSystemIcon(value.operatingSystem)
|
||||
column_ip = column_ip .. " ".. discover.getOsIcon(value.operatingSystem)
|
||||
end
|
||||
|
||||
if value["systemhost"] then column_ip = column_ip .. " <i class='fa fa-flag'></i> " end
|
||||
|
|
@ -242,7 +242,7 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
column_ip = column_ip .." <a href='".. ntop.getHttpPrefix() .. "/lua/hosts_stats.lua?country="..host.country.."'><img src='".. ntop.getHttpPrefix() .. "/img/blank.gif' class='flag flag-".. string.lower(host.country) .."'></a> "
|
||||
end
|
||||
|
||||
local icon = getOSIcon(value["os"])
|
||||
local icon = discover.getOsIcon(value["os"])
|
||||
if(host ~= nil) then
|
||||
icon = icon .." ".. discover.devtype2icon(host.devtype)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue