mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Moved header for all pages to page_utils
This commit is contained in:
parent
539dcd322c
commit
6d7de7bd57
34 changed files with 114 additions and 93 deletions
|
|
@ -7,6 +7,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|||
|
||||
require "lua_utils"
|
||||
local json = require ("dkjson")
|
||||
local page_utils = require("page_utils")
|
||||
|
||||
-- whether to return host statistics: on by default
|
||||
local host_stats = _GET["host_stats"]
|
||||
|
|
@ -20,7 +21,7 @@ host = _GET["host"]
|
|||
|
||||
if(host_info["host"] == nil) then
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
|
||||
page_utils.print_header()
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
print("<div class=\"alert alert-danger\"><img src=".. ntop.getHttpPrefix() .. "/img/warning.png> Host parameter is missing (internal error ?)</div>")
|
||||
return
|
||||
|
|
@ -70,7 +71,7 @@ host = interface.getHostInfo(host_info["host"], host_info["vlan"])
|
|||
|
||||
if(host == nil) then
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
|
||||
page_utils.print_header()
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
print("<div class=\"alert alert-danger\"><img src=".. ntop.getHttpPrefix() .. "/img/warning.png> Host ".. host_info["host"] .. " Vlan" ..host_info["vlan"].." cannot be found (expired ?)</div>")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue