Fixes an issue when dumping flows already partially dumped

The final dump for flows partially dumped could be, under certain
conditions, skipped. This commit addresses the issue.

Fixes #846
This commit is contained in:
Simone Mainardi 2016-12-21 19:44:47 +01:00
parent 8cf2c97569
commit ff7c61bb9d
9 changed files with 57 additions and 63 deletions

View file

@ -416,10 +416,6 @@ function drawRRD(ifid, host, rrdFile, zoomLevel, baseurl, show_timeseries,
names = {}
series = {}
if(zoomLevel == nil) then
zoomLevel = "1h"
end
nextZoomLevel = zoomLevel;
epoch = tonumber(selectedEpoch);
@ -428,12 +424,12 @@ function drawRRD(ifid, host, rrdFile, zoomLevel, baseurl, show_timeseries,
if(k > 1) then
nextZoomLevel = zoom_vals[k-1][1]
end
if(epoch) then
if(epoch ~= nil) then
start_time = epoch - zoom_vals[k][3]/2
end_time = epoch + zoom_vals[k][3]/2
else
end_time = os.time()
start_time = end_time - zoom_vals[k][3]/2
start_time = end_time - zoom_vals[k][3]
end
end
end