mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Initial work for widget implementation
This commit is contained in:
parent
427a0e6667
commit
f7b1e7d689
29 changed files with 1353 additions and 36 deletions
16
scripts/lua/get_widgets.lua
Normal file
16
scripts/lua/get_widgets.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
--
|
||||
-- (C) 2020 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
|
||||
local widget_utils = require("widget_utils")
|
||||
local json = require "dkjson"
|
||||
|
||||
sendHTTPContentTypeHeader('application/json')
|
||||
|
||||
local widgets = widget_utils.get_all_widgets()
|
||||
print(json.encode(widgets))
|
||||
Loading…
Add table
Add a link
Reference in a new issue