mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Initial thpt calc for ZMQ flows
This commit is contained in:
parent
d4ad9dae90
commit
3bc4312ed1
2 changed files with 13 additions and 10 deletions
|
|
@ -345,14 +345,14 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
|
|||
record["column_bytes"] = bytesToSize(value["bytes"])..""
|
||||
|
||||
local column_thpt = ''
|
||||
if(throughput_type == "pps") then
|
||||
column_thpt = column_thpt..pktsToSize(value["throughput_pps"]).. " "
|
||||
else
|
||||
column_thpt = column_thpt..bitsToSize(8*value["throughput_bps"]).. " "
|
||||
end
|
||||
|
||||
if((value["throughput_trend_"..throughput_type] ~= nil)
|
||||
and (value["throughput_trend_"..throughput_type] > 0)) then
|
||||
if(throughput_type == "pps") then
|
||||
column_thpt = column_thpt..pktsToSize(value["throughput_pps"]).. " "
|
||||
else
|
||||
column_thpt = column_thpt..bitsToSize(8*value["throughput_bps"]).. " "
|
||||
end
|
||||
|
||||
if(value["throughput_trend_"..throughput_type] == 1) then
|
||||
column_thpt = column_thpt.."<i class='fa fa-arrow-up'></i>"
|
||||
elseif(value["throughput_trend_"..throughput_type] == 2) then
|
||||
|
|
@ -360,9 +360,6 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
|
|||
elseif(value["throughput_trend_"..throughput_type] == 3) then
|
||||
column_thpt = column_thpt.."<i class='fa fa-minus'></i>"
|
||||
end
|
||||
|
||||
else
|
||||
column_thpt = "0 "..throughput_type
|
||||
end
|
||||
record["column_thpt"] = column_thpt
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue