mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 17:00:10 +00:00
Initial nedge2 lua page setup
This commit is contained in:
parent
f85f3be347
commit
e3941556ae
7 changed files with 108 additions and 1 deletions
40
scripts/lua/admin/nf_edit_user.lua
Normal file
40
scripts/lua/admin/nf_edit_user.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
--
|
||||
-- (C) 2013-17 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
if((dirs.scriptdir ~= nil) and (dirs.scriptdir ~= "")) then package.path = dirs.scriptdir .. "/lua/modules/?.lua;" .. package.path end
|
||||
|
||||
require "lua_utils"
|
||||
local host_pools_utils = require "host_pools_utils"
|
||||
|
||||
-- Administrator check
|
||||
if not isAdministrator() then
|
||||
return
|
||||
end
|
||||
|
||||
local username = _GET["username"]
|
||||
--local pool_id = host_pools_utils.usernameToPoolId(username)
|
||||
local page = _GET["page"] or "settings"
|
||||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
||||
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
|
||||
print[[<ul class="nav nav-tabs">
|
||||
<li ]] print(ternary(page == "settings", 'class="active"', '')) print[[><a href="?page=settings&username=]] print(username) print[[">]] print(i18n("users.settings")) print[[</a></li>
|
||||
<li ]] print(ternary(page == "protocols", 'class="active"', '')) print[[><a href="?page=protocols&username=]] print(username) print[[">]] print(i18n("protocols")) print[[</a></li>
|
||||
<li ]] print(ternary(page == "categories", 'class="active"', '')) print[[><a href="?page=categories&username=]] print(username) print[[">]] print(i18n("users.categories")) print[[</a></li>
|
||||
</ul><br>]]
|
||||
|
||||
if page == "settings" then
|
||||
print("TODO settings page")
|
||||
elseif page == "protocols" then
|
||||
print("TODO protocols page")
|
||||
elseif page == "categories" then
|
||||
print("TODO categories page")
|
||||
end
|
||||
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
|
||||
Loading…
Add table
Add a link
Reference in a new issue