Show upload/download in footer chart

Rx and Tx is not always available. If it is not, the chart is hidden.
This commit is contained in:
emanuele-f 2019-01-09 18:37:48 +01:00
parent 21fbc9867f
commit 123743d49c
4 changed files with 42 additions and 69 deletions

View file

@ -106,11 +106,8 @@ function dumpInterfaceStats(interface_name)
res["local2remote"] = ifstats["localstats"]["bytes"]["local2remote"]
res["remote2local"] = ifstats["localstats"]["bytes"]["remote2local"]
if ntop.isnEdge() then
res["bytes_upload"] = ifstats["eth"]["egress"]["bytes"]
res["bytes_download"] = ifstats["eth"]["ingress"]["bytes"]
end
res["bytes_upload"] = ifstats["eth"]["egress"]["bytes"]
res["bytes_download"] = ifstats["eth"]["ingress"]["bytes"]
if ntop.isnEdge() and ifstats.type == "netfilter" and ifstats.netfilter then
res["netfilter"] = ifstats.netfilter