From c24c0dd335385218132d88dd2eb0e0694eb5fb06 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 7 Oct 2020 17:14:22 +0200 Subject: [PATCH] Fix MPTCP graph --- luci-app-mptcp/luasrc/controller/mptcp.lua | 3 ++- luci-app-mptcp/luasrc/view/mptcp/multipath.htm | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua index 986cb9725..d40078b17 100644 --- a/luci-app-mptcp/luasrc/controller/mptcp.lua +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -71,12 +71,13 @@ function multipath_bandwidth() multipath = "off" end if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then + local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or "" local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or "" if bwc ~= nil then --result[dev] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" result[intname] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" else - result[dev] = "[]" + result[intname] = "[]" end end end diff --git a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm index 5df6ddd81..827412292 100644 --- a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm +++ b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm @@ -190,13 +190,6 @@ height = dnsvg.offsetHeight - 2; data_wanted = Math.ceil(width / step); - /* prefill datasets - for (var i = 0; i < data_wanted; i++) - { - data_tx[i] = 0; - } - */ - /* find svg elements */ labeldn_25 = Gdn.getElementById('label_25'); labeldn_50 = Gdn.getElementById('label_50');