mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Lua 5.3+ compat fixes
This commit is contained in:
parent
5a9f75dd0a
commit
12d4f54c9e
4 changed files with 10 additions and 10 deletions
|
|
@ -66,10 +66,10 @@ function queryEpochData(schema, tags, selectedEpoch, zoomLevel, options)
|
|||
if((selectedEpoch == nil) or (selectedEpoch == "")) then
|
||||
selectedEpoch = os.time()
|
||||
end_time = tonumber(selectedEpoch)
|
||||
start_time = end_time-d
|
||||
start_time = end_time - d
|
||||
else
|
||||
end_time = tonumber(selectedEpoch) + d/2
|
||||
start_time = tonumber(selectedEpoch) - d/2
|
||||
end_time = tonumber(selectedEpoch) + math.floor(d / 2)
|
||||
start_time = tonumber(selectedEpoch) - math.floor(d / 2)
|
||||
end
|
||||
|
||||
return ts_utils.query(schema, tags, start_time, end_time, options)
|
||||
|
|
@ -484,8 +484,8 @@ print[[
|
|||
nextZoomLevel = zoom_vals[k-1][1]
|
||||
end
|
||||
if(epoch ~= nil) then
|
||||
start_time = epoch - zoom_vals[k][3]/2
|
||||
end_time = epoch + zoom_vals[k][3]/2
|
||||
start_time = epoch - math.floor(zoom_vals[k][3] / 2)
|
||||
end_time = epoch + math.floor(zoom_vals[k][3] / 2)
|
||||
else
|
||||
end_time = os.time()
|
||||
start_time = end_time - zoom_vals[k][3]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue