mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
Migrates datasource datamodel to new class implementation
This commit is contained in:
parent
75b66d82b9
commit
37c58f56de
10 changed files with 30 additions and 30 deletions
|
|
@ -7,7 +7,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|||
|
||||
require("lua_utils")
|
||||
local datasources_utils = require("datasources_utils")
|
||||
local datamodel = require("datamodel_utils")
|
||||
local datamodel = require("datamodel")
|
||||
|
||||
local function reportError(msg)
|
||||
print(json.encode({ error = msg, success = false, csrf = ntop.getRandomCSRFValue() }))
|
||||
|
|
@ -21,6 +21,6 @@ interface.select(ifname)
|
|||
local ifstats = interface.getStats()
|
||||
local m = nil
|
||||
|
||||
local m = datamodel:create({"IPv4", "IPv6"})
|
||||
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