Implements UI browser for all plugin files

Implements #3283
This commit is contained in:
Simone Mainardi 2020-01-23 13:11:53 +01:00
parent facfdae358
commit 4831c7e990
5 changed files with 118 additions and 24 deletions

View file

@ -75,8 +75,9 @@ for script_name, script in pairs(scripts.modules) do
end
if(script.edition == "community") then
local path = string.sub(script.source_path, string.len(dirs.scriptdir)+1)
edit_url = ntop.getHttpPrefix() .. '/lua/code_viewer.lua?lua_script_path='.. path
local plugin_file_path = string.sub(script.source_path, string.len(dirs.scriptdir) + 1)
local plugin_path = string.sub(script.plugin.path, string.len(dirs.scriptdir) + 1)
edit_url = string.format("%s/lua/code_viewer.lua?plugin_file_path=%s&plugin_path=%s", ntop.getHttpPrefix(), plugin_file_path, plugin_path)
end
local input_handler = script.gui.input_builder