From a110cfccd5d9b84648a5e72d75c9e9240d6fd24d Mon Sep 17 00:00:00 2001 From: Pau Escrich Date: Tue, 25 Feb 2014 15:49:44 +0100 Subject: [PATCH] luci-app-bmx6: Adapt the code to last bmx6 (some fields changed). Reduce the information shown in the tunnels/gateways page. Signed-off-by: Pau Escrich --- luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua | 4 ++-- luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/links.htm | 2 +- .../files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm | 8 +++----- luci-app-bmx6/files/www/cgi-bin/bmx6-info | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua b/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua index cb5642e..26e1cb3 100644 --- a/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua +++ b/luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua @@ -69,7 +69,7 @@ function index() entry(place,call("action_nodes_j"),"Nodes",1) table.remove(place) - --- links + --- links table.insert(place,"Links") entry(place,call("action_links"),"Links",2).leaf = true table.remove(place) @@ -204,7 +204,7 @@ function action_links(host) devlinks[l.viaDev] = {} end for _,l in ipairs(links) do - l.globalId = luci.util.split(l.globalId,'.')[1] + l.name = luci.util.split(l.name,'.')[1] table.insert(devlinks[l.viaDev],l) end end diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/links.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/links.htm index 65e62d7..77b9ed1 100644 --- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/links.htm +++ b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/links.htm @@ -20,7 +20,7 @@ diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm index d4cc38b..92b22a9 100644 --- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm +++ b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm @@ -66,11 +66,9 @@ - - - + @@ -97,8 +95,8 @@ if ( tunnel.tunName != "---" ) status = ''; if ( advnet == "0.0.0.0/0" ) advnet = "Internet"; - res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net, tunnel.advType, - tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.srcIngress, tunnel.id]); + res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net, + tunnel.pathMtc, tunnel.tunMtc, tunnel.rating, tunnel.srcIngress, tunnel.id]); } return res; }); diff --git a/luci-app-bmx6/files/www/cgi-bin/bmx6-info b/luci-app-bmx6/files/www/cgi-bin/bmx6-info index 931cbf6..37ff25a 100644 --- a/luci-app-bmx6/files/www/cgi-bin/bmx6-info +++ b/luci-app-bmx6/files/www/cgi-bin/bmx6-info @@ -97,7 +97,7 @@ if [ "$QUERY" == '$neighbours' ]; then exit 0 else if [ "$QUERY" == '$tunnels' ]; then - bmx6 -c --jshow tunnels + bmx6 -c --jshow tunnels /r=0 exit 0 else -- 2.30.2
- <%=l.globalId%> + <%=l.name%>
<%:Network%> <%:Bandwidth%> <%:SearchNet%><%:Type%> <%:Path Metric%><%:IP metric%> <%:Tun metric%><%:Bonus%><%:Rating%> <%:Src%> <%:Search id%>