Fix host pools stats

This commit is contained in:
Alfredo Cardigliano 2021-12-29 10:10:30 +01:00
parent f396145060
commit 0893f928ad
5 changed files with 220 additions and 216 deletions

View file

@ -19,14 +19,13 @@ local flow = interface.findFlowByKeyAndHashId(tonumber(flow_key), tonumber(flow_
local throughput_type = getThroughputType()
sendHTTPContentTypeHeader('text/html')
--sendHTTPHeader('application/json')
if(flow == nil) then
print('{}')
print('{}')
else
diff0 = os.time()-flow["seen.first"]
diff = os.time()-flow["seen.last"]
diff0 = os.time()-flow["seen.first"]
diff = os.time()-flow["seen.last"]
-- Default values
thpt = 0
thpt_display = bitsToSize(0)