AJAX updates of flows dropped

This commit is contained in:
Simone Mainardi 2017-12-14 19:56:13 +01:00
parent d84bc95d3f
commit 09ae32b324
4 changed files with 10 additions and 2 deletions

View file

@ -362,8 +362,8 @@ for _key, _value in pairsByKeys(vals, funct) do
-- exists only for bridged interfaces
if value["flows.dropped"] then
print ("\", \"column_num_dropped_flows\" : \""..value["flows.dropped"])
if isBridgeInterface(interface.getStats()) then
print ("\", \"column_num_dropped_flows\" : \""..(value["flows.dropped"] or 0))
end
sent2rcvd = round((value["bytes.sent"] * 100) / (value["bytes.sent"]+value["bytes.rcvd"]), 0)