mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
Implements ability to consolidate widgets (slices and values)
This commit is contained in:
parent
3c6674e32d
commit
727a5d56fc
11 changed files with 178 additions and 179 deletions
|
|
@ -1,26 +0,0 @@
|
|||
--
|
||||
-- (C) 2020 - ntop.org
|
||||
--
|
||||
|
||||
dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require("lua_utils")
|
||||
local datasources_utils = require("datasources_utils")
|
||||
local datamodel = require("datamodel")
|
||||
|
||||
local function reportError(msg)
|
||||
print(json.encode({ error = msg, success = false, csrf = ntop.getRandomCSRFValue() }))
|
||||
end
|
||||
|
||||
local ifid = _GET["ifid"] or 0
|
||||
local if_name = getInterfaceName(ifid)
|
||||
local chart_type = _GET["chart_type"] or "size"
|
||||
|
||||
interface.select(ifname)
|
||||
local ifstats = interface.getStats()
|
||||
local m = nil
|
||||
|
||||
local m = datamodel:new({"IPv4", "IPv6"})
|
||||
m:appendRow(when, "IP Version Distribution", { ifstats.eth.IPv4_packets, ifstats.eth.IPv6_packets })
|
||||
return(m)
|
||||
Loading…
Add table
Add a link
Reference in a new issue