mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix MPTCP graph
This commit is contained in:
parent
cb129b6c3d
commit
51117fc704
1 changed files with 18 additions and 20 deletions
|
@ -95,28 +95,26 @@ function multipath_bandwidth()
|
||||||
value=(string.gsub(value, "^%[%[", ""))
|
value=(string.gsub(value, "^%[%[", ""))
|
||||||
value=(string.gsub(value, "%]%]", ""))
|
value=(string.gsub(value, "%]%]", ""))
|
||||||
local temp1 = string.split(value, "],")
|
local temp1 = string.split(value, "],")
|
||||||
res[key][1]=temp1[1]
|
if temp1[2] ~= nil then
|
||||||
for i=2,60 do
|
res[key][1]=temp1[1]
|
||||||
res[key][i]={}
|
for i=2,60 do
|
||||||
if temp1[i] ~= "" and temp1[i] ~= nil then
|
res[key][i]={}
|
||||||
res[key][i]=(string.gsub(temp1[i], "%[", " "))
|
res[key][i]=(string.gsub(temp1[i], "%[", " "))
|
||||||
else
|
|
||||||
res[key][i]="0,0,0,0,0"
|
|
||||||
end
|
end
|
||||||
end
|
for i=1,60 do
|
||||||
for i=1,60 do
|
res[key][i] = string.split(res[key][i], ",")
|
||||||
res[key][i] = string.split(res[key][i], ",")
|
for j=1,5 do
|
||||||
for j=1,5 do
|
if "string"== type(res[key][i][j]) then
|
||||||
if "string"== type(res[key][i][j]) then
|
res[key][i][j]= tonumber(res[key][i][j])
|
||||||
res[key][i][j]= tonumber(res[key][i][j])
|
end
|
||||||
end
|
if "string"==type(res["total"][i][j]) then
|
||||||
if "string"==type(res["total"][i][j]) then
|
res["total"][i][j]= tonumber(res["total"][i][j])
|
||||||
res["total"][i][j]= tonumber(res["total"][i][j])
|
end
|
||||||
end
|
if j ==1 then
|
||||||
if j ==1 then
|
res["total"][i][j] = res[key][i][j]
|
||||||
res["total"][i][j] = res[key][i][j]
|
else
|
||||||
else
|
res["total"][i][j] = res["total"][i][j] + res[key][i][j]
|
||||||
res["total"][i][j] = res["total"][i][j] + res[key][i][j]
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue