--
-- (C) 2013-16 - ntop.org
--
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"
require "prefs_utils"
if (ntop.isPro()) then
package.path = dirs.installdir .. "/scripts/lua/pro/?.lua;" .. package.path
require "report_utils"
end
sendHTTPHeader('text/html; charset=iso-8859-1')
if(haveAdminPrivileges()) then
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
active_page = "admin"
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
ntop.loadPrefsDefaults()
prefs = ntop.getPrefs()
print [[
Runtime Preferences
]]
subpage_active = _GET["subpage_active"]
report_active = ""
in_memory_active = ""
on_disk_rrds_active = ""
on_disk_dbs_active = ""
nbox_active = ""
alerts_active = ""
users_active = ""
if (subpage_active == nil or subpage_active == "") then
subpage_active = "report"
end
if (subpage_active == "report") then
report_active = "active"
end
if (subpage_active == "in_memory") then
in_memory_active = "active"
end
if (subpage_active == "on_disk_rrds") then
on_disk_rrds_active = "active"
end
if (subpage_active == "on_disk_dbs") then
on_disk_dbs_active = "active"
end
if (subpage_active == "nbox") then
nbox_active = "active"
end
if (subpage_active == "alerts") then
alerts_active = "active"
end
if (subpage_active == "users") then
users_active = "active"
end
-- ================================================================================
function printReportVisualization()
print(' ]]
end
-- ================================================================================
function printTopTalkers()
print(' ]]
end
-- ================================================================================
function printStatsDatabases()
print(' ]]
end
-- ================================================================================
function printAlerts()
print(' ]]
end
-- ================================================================================
function printNbox()
print(' ]]
end
-- ================================================================================
function printUsers()
print('
]]
end
-- ================================================================================
function printInMemory()
print(' ]]
end
-- ================================================================================
function printStatsRrds()
print(' ]]
end
print[[
|
| ]]
if (subpage_active == "report") then
printReportVisualization()
end
if (subpage_active == "in_memory") then
printInMemory()
end
if (subpage_active == "on_disk_rrds") then
printStatsRrds()
end
if (subpage_active == "on_disk_dbs") then
printStatsDatabases()
end
if (subpage_active == "alerts") then
printAlerts()
end
if (subpage_active == "nbox") then
if (ntop.isPro()) then
printNbox()
end
end
if (subpage_active == "users") then
printUsers()
end
print[[
|
]]
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
end