Fixes l4 proto historical not available when light ts are enabled

This commit is contained in:
MatteoBiscosi 2022-09-29 18:38:58 +02:00
parent 7594a6e9cc
commit b81a031722

View file

@ -52,7 +52,7 @@ for id, _ in ipairs(l4_keys) do
proto_stats["totalPctg"] = round((proto_stats["totalBytes"] * 100) / total, 2)
proto_stats["breakdown"] = round((proto_stats["bytesSent"] * 100) / (proto_stats["bytesSent"] + proto_stats["bytesRcvd"]), 0)
if(areHostTimeseriesEnabled(ifId, url2hostinfo(_GET))) then -- Check if the host timeseries are enabled
if(areHostTimeseriesEnabled(ifId, url2hostinfo(_GET)) and ntop.getPref("ntopng.prefs.hosts_ts_creation") == "full") then -- Check if the host timeseries are enabled
proto_stats["historical"] = hostinfo2detailshref(host, {page = "historical", ts_schema = "host:l4protos", l4proto = k}, '<i class="fas fa-chart-area"></i>')
end