mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Add hour and day resolutions
This commit is contained in:
parent
b845e90ed7
commit
a6e3f19677
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue