mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
New page_utils api to handle sidebar subitems selection
This commit is contained in:
parent
6704ae5040
commit
4f6788fb58
73 changed files with 197 additions and 143 deletions
|
|
@ -18,7 +18,7 @@ local plugins_utils = require("plugins_utils")
|
|||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
||||
page_utils.print_header("Example Page")
|
||||
page_utils.set_active_menu_entry(page_utils.menu_entries.example_plugin)
|
||||
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ return {
|
|||
-- before entries with lower sort order.
|
||||
sort_order = -1,
|
||||
|
||||
-- Information about the menu entry, see page_utils.menu_entries
|
||||
menu_entry = {key = "example_plugin", i18n_title = "Example Page", section = "system_stats"},
|
||||
|
||||
-- Conditionally show or hide the menu entry
|
||||
is_shown = function()
|
||||
return(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue