mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 17:00:10 +00:00
Removed charts icon even when not available
This commit is contained in:
parent
6f68081826
commit
eb3c87582f
1 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ local host = interface.getHostInfo(host_ip, host_vlan)
|
|||
|
||||
local total = 0
|
||||
local proto_info = {}
|
||||
local timeseries_not_available = (host["localhost"] == false or host["is_multicast"] == true or host["is_broadcast"] == true)
|
||||
|
||||
-- Calculate total bytes
|
||||
for id, _ in ipairs(l4_keys) do
|
||||
|
|
@ -52,7 +53,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)) and ntop.getPref("ntopng.prefs.hosts_ts_creation") == "full") then -- Check if the host timeseries are enabled
|
||||
if(areHostTimeseriesEnabled(ifId) and ntop.getPref("ntopng.prefs.hosts_ts_creation") == "full") and not timeseries_not_available 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue