New pro charts features and timeseries api (#1865)

* Integrate modified nvd3 library with zoom and multicharts working support

* Fix count in RRD driver

* Initial chart ajax migration

* Update nvd3 with zoom stack support

* Fix RRD listSeries with directories

* Work in progress graphs

* Compatibility fix

* Initial support for schema based api

* Add missing script

* Fix listSeries for existance check

* Implement topk timseries api

* Implement topk queries and fix labels and formats

* Migrate interface top sender and receivers

* Migrate charts to new API

* Move timeseries list for menu inside respective scripts

* Add support for extended labels

* Fix missing fields while chaning graph resolution

Also Rename drawRRD in drawGraphs

* Fix historical tabs

* Add missing time fence in influx topk

* Add graphs support for custom statistics visualization

* Initial support for graphs statistics footer

* Implement statistics in single graphs for RRD driver

* Move sampling function into the driver and fix graph statistics

* Fix max/min value offset

* Implement influxdb sampling use built-in FILL

* Implement stats and total serie in influxdb driver

* Update nvd3 with multiChart fixes

* Update nvd3 with new multiChart fixes

* RRD driver fixes

* Move metrics type from single metric to schema

* Handle ajax errors and empty data in charts

* Fix flow device interfaces graphs

* Use timeserie label as timeseries dropdown text

* Implement topk aggregation into one data serie

* ts_utils module now provides all the schemas

* Migrate ntop.exist(rrd) to ts_utils.exist

* Fix timeseries dropdown label

* L4 protos fixes for charts

* Migrate getProtoVolume to new API

* Integrate nvd3 fix for tooltip position

* Initial community graphs migration to timseries API

* Fix community timeseries dropdown and historical tabs

* Hide total serie by default

* Remove l4 protos from topk charts
This commit is contained in:
Emanuele Faranda 2018-07-18 15:09:19 +02:00 committed by GitHub
parent 2c641cf286
commit 4cbe45a948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 5579 additions and 1765 deletions

View file

@ -109,8 +109,6 @@ end
-- Iterates each active host on the ifname interface for RRD creation.
-- Each host is passed to the callback with some more information.
function callback_utils.foreachLocalRRDHost(ifname, deadline, callback)
local hostbase
interface.select(ifname)
local iterator = callback_utils.getLocalHostsIterator(false --[[ no details ]])
@ -126,17 +124,7 @@ function callback_utils.foreachLocalRRDHost(ifname, deadline, callback)
end
if host ~= nil then
if(host.localhost) then
local keypath = getPathFromKey(hostname)
hostbase = os_utils.fixPath(dirs.workingdir .. "/" .. getInterfaceId(ifname) .. "/rrd/" .. keypath)
-- NOTE: filesystem activity here
if(not(ntop.exists(hostbase))) then
ntop.mkdir(hostbase)
end
end
if callback(hostname, host--[[hostinfo]], hostbase--[[base RRD host directory]]) == false then
if callback(hostname, host--[[hostinfo]]) == false then
return false
end
end
@ -150,8 +138,6 @@ end
-- Iterates each active host on the ifname interface.
-- Each host is passed to the callback with some more information.
function callback_utils.foreachHost(ifname, deadline, callback)
local hostbase
interface.select(ifname)
local iterator = callback_utils.getHostsIterator(false --[[ no details ]])
@ -177,8 +163,6 @@ end
-- Iterates each active host on the ifname interface.
-- Each host is passed to the callback with some more information.
function callback_utils.foreachLocalHost(ifname, deadline, callback)
local hostbase
interface.select(ifname)
local iterator = callback_utils.getLocalHostsIterator(false --[[ no details ]])
@ -215,14 +199,7 @@ function callback_utils.foreachDevice(ifname, deadline, callback)
return false
end
local keypath = getPathFromKey(devicename)
local devicebase = os_utils.fixPath(dirs.workingdir .. "/" .. getInterfaceId(ifname) .. "/rrd/" .. keypath)
if(not(ntop.exists(devicebase))) then
ntop.mkdir(devicebase)
end
if callback(devicename, devicestats, devicebase) == false then
if callback(devicename, devicestats) == false then
return false
end
end