Avoid timeseries read operations to display the chart icon

Now the icon is displayed whenever the timeseries are enabled for the given context
This commit is contained in:
emanuele-f 2020-02-19 13:26:05 +01:00
parent 5b70db90ad
commit d1140ec9fd
42 changed files with 201 additions and 149 deletions

View file

@ -1,6 +1,5 @@
require "lua_utils"
require "graph_utils"
local ts_utils = require "ts_utils"
-- Get from redis the throughput type bps or pps
local throughput_type = getThroughputType()
@ -33,7 +32,7 @@ function as2record(ifId, as)
record["column_chart"] = ""
if ts_utils.exists("asn:traffic", {ifid=ifId, asn=as["asn"]}) then
if areASTimeseriesEnabled(ifId) then
record["column_chart"] = '<A HREF="'..ntop.getHttpPrefix()..'/lua/as_details.lua?asn='..as["asn"]..'&page=historical"><i class=\'fas fa-chart-area fa-lg\'></i></A>'
end