-- -- (C) 2013-20 - ntop.org -- -- This an example page provided by this plugin -- menu.lua adds a link to this page into the ntopng main menu. -- Changes to this script must be applied by reloading the plugins from -- http://127.0.0.1:3000/lua/plugins_overview.lua local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local page_utils = require("page_utils") local plugins_utils = require("plugins_utils") sendHTTPContentTypeHeader('text/html') page_utils.set_active_menu_entry(page_utils.menu_entries.example_plugin) dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") local page = _GET["page"] or "overview" local url = plugins_utils.getUrl("example_page.lua") .. "?ifid=" .. getInterfaceId(ifname) local title = i18n("example.custom_page_title") page_utils.print_navbar(title, url, { { active = page == "overview" or not page, page_name = "overview", label = "", }, { hidden = false, active = page == "config", page_name = "config", label = "", }, } ) -- ####################################################### if(page == "overview") then print("

Overview Page

") print[[ Put the content here ]] elseif(page == "config") then print("

Config Page

") print[[ Put the content here ]] end -- ####################################################### dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")