mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Reimplemented view: interface, and Paginator code.
Minor code cleanup
This commit is contained in:
parent
650ce6e202
commit
274921ee5c
34 changed files with 809 additions and 359 deletions
|
|
@ -12,9 +12,10 @@ names = interface.getIfNames()
|
|||
num_ifaces = 0
|
||||
for k,v in pairs(names) do
|
||||
num_ifaces = num_ifaces+1
|
||||
-- io.write(k.."\n")
|
||||
end
|
||||
|
||||
-- tprint(names)
|
||||
|
||||
print [[
|
||||
<div class="masthead">
|
||||
<ul class="nav nav-pills pull-right">
|
||||
|
|
@ -194,13 +195,12 @@ for v,k in pairs(interface.getIfNames()) do
|
|||
interface.select(k)
|
||||
_ifstats = interface.getStats()
|
||||
ifnames[_ifstats.id] = k
|
||||
--io.write(ifnames[_ifstats.id].."=".._ifstats.id.."\n")
|
||||
--io.write("["..k.."/"..v.."][".._ifstats.id.."] "..ifnames[_ifstats.id].."=".._ifstats.id.."\n")
|
||||
if(_ifstats.isView == true) then views[k] = true end
|
||||
end
|
||||
|
||||
for k,v in pairsByKeys(ifnames, asc) do
|
||||
print(" <li>")
|
||||
--io.write(k.."="..v.."\n")
|
||||
|
||||
if(v == ifname) then
|
||||
print("<a href=\""..ntop.getHttpPrefix().."/lua/if_stats.lua?id="..k.."\">")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue