mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Widget improvements
This commit is contained in:
parent
281012610a
commit
17bbfb7c78
10 changed files with 176 additions and 141 deletions
29
scripts/lua/datasources/interface.lua
Normal file
29
scripts/lua/datasources/interface.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--
|
||||
-- (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_utils")
|
||||
|
||||
local function reportError(msg)
|
||||
print(json.encode({ error = msg, success = false, csrf = ntop.getRandomCSRFValue() }))
|
||||
end
|
||||
|
||||
local ifid = _GET["ifid"]
|
||||
local key_ip = _GET["key_ip"]
|
||||
local key_mac = _GET["key_mac"]
|
||||
local key_asn = _GET["key_asn"]
|
||||
local key_metric = _GET["key_metric"]
|
||||
|
||||
local m = datamodel:create({"x", "y"})
|
||||
local when = 0
|
||||
|
||||
for i=1,5 do
|
||||
m:appendRow(when, {i, i})
|
||||
end
|
||||
|
||||
return(m)
|
||||
Loading…
Add table
Add a link
Reference in a new issue