mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
added template.render function
This commit is contained in:
parent
fc3d065180
commit
30bf1e5589
2 changed files with 13 additions and 2 deletions
|
|
@ -10,7 +10,6 @@ local template_utils = require("template_utils")
|
|||
|
||||
local ui_utils = {}
|
||||
|
||||
|
||||
function ui_utils.render_configuration_footer(item)
|
||||
return template_utils.gen('pages/components/manage-configuration-link.template', {item = item})
|
||||
end
|
||||
|
|
@ -63,9 +62,13 @@ function ui_utils.render_pools_dropdown(pools_instance, member, key)
|
|||
end
|
||||
|
||||
function ui_utils.create_navbar_title(title, subpage, title_link)
|
||||
|
||||
if isEmptyString(subpage) then return title end
|
||||
return "<a href='".. title_link .."'>".. title .. "</a> / <span>"..subpage.."</span>"
|
||||
end
|
||||
|
||||
--- Shortcut function to print a togglw switch inside the requested page
|
||||
function ui_utils.print_toggle_switch(context)
|
||||
print(template_utils.gen("on_off_switch.html", context))
|
||||
end
|
||||
|
||||
return ui_utils
|
||||
Loading…
Add table
Add a link
Reference in a new issue