mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Initial import from SVN
This commit is contained in:
parent
1601f6bbf2
commit
730d76b9f5
1612 changed files with 715104 additions and 0 deletions
33
scripts/lua/config_historical_interface.lua
Normal file
33
scripts/lua/config_historical_interface.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
--
|
||||
-- (C) 2013-15 - ntop.org
|
||||
--
|
||||
|
||||
dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
|
||||
sendHTTPHeader('application/html')
|
||||
|
||||
if(_GET["csrf"] ~= nil) then
|
||||
interface_name = _GET["id"]
|
||||
from = tonumber(_GET["from"])
|
||||
to = tonumber(_GET["to"])
|
||||
epoch = tonumber(_GET["epoch"])
|
||||
|
||||
ret = false
|
||||
|
||||
if (interface_name ~= nil) then
|
||||
interface_id = tonumber(interface.name2id(interface_name))
|
||||
end
|
||||
if ((from ~= nil) and (to ~= nil) and (interface_id ~= nil)) then
|
||||
-- io.write(from .. '-' .. to.. '-' .. interface_id .. '\n')
|
||||
ret = interface.loadHistoricalInterval(from,to,interface_id)
|
||||
end
|
||||
|
||||
if (ret) then
|
||||
print "{ \"result\" : \"0\"}";
|
||||
else
|
||||
print ( "{ \"result\" : \"-1\"}" );
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue