mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Develop new rest APi to save columns visibility and columns order in future #7389
This commit is contained in:
parent
5bf92eec23
commit
15504241d3
3 changed files with 21 additions and 25 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
local json = require "dkjson"
|
||||
|
||||
-- #####################################
|
||||
|
||||
|
|
@ -31,6 +32,8 @@ local function get_column_config()
|
|||
local visible_columns = ntop.getCache(redis_key) or {}
|
||||
if visible_columns == nil or visible_columns == "" then
|
||||
visible_columns = {}
|
||||
else
|
||||
visible_columns = json.decode(visible_columns)
|
||||
end
|
||||
return(rest_utils.answer(rest_utils.consts.success.ok, visible_columns))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue