mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Community fixes
This commit is contained in:
parent
83301b3730
commit
b97abeb6ad
3 changed files with 17 additions and 6 deletions
|
|
@ -492,13 +492,20 @@ print[[
|
|||
return
|
||||
end
|
||||
|
||||
local min_zoom = getMinZoomResolution(schema)
|
||||
local min_zoom_k = 1
|
||||
|
||||
nextZoomLevel = zoomLevel;
|
||||
epoch = tonumber(selectedEpoch);
|
||||
|
||||
for k,v in ipairs(zoom_vals) do
|
||||
if zoom_vals[k][1] == min_zoom then
|
||||
min_zoom_k = k
|
||||
end
|
||||
|
||||
if(zoom_vals[k][1] == zoomLevel) then
|
||||
if(k > 1) then
|
||||
nextZoomLevel = zoom_vals[k-1][1]
|
||||
nextZoomLevel = zoom_vals[math.max(k-1, min_zoom_k)][1]
|
||||
end
|
||||
if(epoch ~= nil) then
|
||||
start_time = epoch - math.floor(zoom_vals[k][3] / 2)
|
||||
|
|
@ -588,8 +595,6 @@ end -- options.timeseries
|
|||
|
||||
print(' Timeframe: <div class="btn-group" data-toggle="buttons" id="graph_zoom">\n')
|
||||
|
||||
local min_zoom = getMinZoomResolution(schema)
|
||||
|
||||
for k,v in ipairs(zoom_vals) do
|
||||
-- display 1 minute button only for networks and interface stats
|
||||
-- but exclude applications. Application statistics are gathered
|
||||
|
|
@ -890,6 +895,10 @@ var yAxis = new Rickshaw.Graph.Axis.Y({
|
|||
|
||||
yAxis.render();
|
||||
|
||||
]]
|
||||
|
||||
if zoomLevel ~= nextZoomLevel then
|
||||
print[[
|
||||
$("#chart").click(function() {
|
||||
if(hover.selected_epoch)
|
||||
window.location.href = ']]
|
||||
|
|
@ -903,8 +912,10 @@ end
|
|||
|
||||
print('&epoch=')
|
||||
print[['+hover.selected_epoch;
|
||||
});
|
||||
});]]
|
||||
end
|
||||
|
||||
print[[
|
||||
</script>
|
||||
|
||||
]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue