mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +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
29
attic/scripts/lua/datasources/interface.lua
Normal file
29
attic/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")
|
||||
|
||||
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:new({"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