Add rest endpoint to get interface dscp stats

This commit is contained in:
Alfredo Cardigliano 2020-07-20 17:35:03 +02:00
parent 7f06331772
commit 8b4f1c7e07
7 changed files with 83 additions and 16 deletions

View file

@ -47,7 +47,7 @@ if stats == nil then
return
end
for key, value in pairs(stats.dscp) do
for key, value in pairsByKeys(stats.dscp, asc) do
res[#res + 1] = {
label = dscp_consts.ds_precedence_descr(key),
value = ternary(received_stats, value['packets.rcvd'], value['packets.sent'])