Layout improvements for L2 devices

Implements #1040
This commit is contained in:
Simone Mainardi 2017-03-13 13:01:48 +01:00
parent 11953e3ede
commit 80f8190c97
3 changed files with 22 additions and 11 deletions

View file

@ -24,7 +24,8 @@ print [[
interface.select(ifname)
ifId = interface.getStats().id
local ifs = interface.getStats()
ifId = ifs.id
-- ##############################################
@ -247,13 +248,18 @@ print [[
<ul class="dropdown-menu">
]]
print('<li><a href="'..ntop.getHttpPrefix()..'/lua/mac_stats.lua">Layer 2</a></li>')
if ifs["has_macs"] == true then
print('<li><a href="'..ntop.getHttpPrefix()..'/lua/mac_stats.lua">Layer 2</a></li>')
if(info["version.enterprise_edition"] == true) then
print('<li class="divider"></li>')
end
end
if(info["version.enterprise_edition"] == true) then
print('<li class="divider"></li>')
print('<li><a href="'..ntop.getHttpPrefix()..'/lua/pro/enterprise/flowdevices_stats.lua">sFlow/NetFlow</a></li>')
print('<li><a href="'..ntop.getHttpPrefix()..'/lua/pro/enterprise/snmpdevices_stats.lua">SNMP</a></li>')
if ifs["type"] == "zmq" then
print('<li><a href="'..ntop.getHttpPrefix()..'/lua/pro/enterprise/flowdevices_stats.lua">sFlow/NetFlow</a></li>')
end
print('<li><a href="'..ntop.getHttpPrefix()..'/lua/pro/enterprise/snmpdevices_stats.lua">SNMP</a></li>')
end
print("</ul> </li>")