Add hour and day resolutions

This commit is contained in:
emanuele-f 2016-09-17 15:51:05 +02:00
parent b845e90ed7
commit a6e3f19677
2 changed files with 4 additions and 1 deletions

View file

@ -99,7 +99,7 @@ if (_GET["host"] ~= nil and _GET["ifid"] ~= nil and _GET["step"] ~= nil) then
if fetchData then
res.live = islive
res.step = (res.live and _GET["step"]) or fstep
res.step = _GET["step"]
res.up = {}
res.down = {}
res.bg = {}
@ -118,6 +118,7 @@ if (_GET["host"] ~= nil and _GET["ifid"] ~= nil and _GET["step"] ~= nil) then
local end_time = tonumber(_GET["stop"])
local cf = _GET["cf"] or "AVERAGE"
local fstart, fstep, fnames, fdata = ntop.rrd_fetch(rrd, cf, start_time, end_time)
res.step = fstep
function getValue(w) if w ~= w then return 0 else return math.max(tonumber(w), 0) end end