luci-app-bmx6: Adapt the code to last bmx6 (some fields changed).
authorPau Escrich <p4u@dabax.net>
Tue, 25 Feb 2014 14:49:44 +0000 (15:49 +0100)
committerPau Escrich <p4u@dabax.net>
Tue, 25 Feb 2014 14:49:44 +0000 (15:49 +0100)
               Reduce the information shown in the tunnels/gateways page.

Signed-off-by: Pau Escrich <p4u@dabax.net>
luci-app-bmx6/files/usr/lib/lua/luci/controller/bmx6.lua
luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/links.htm
luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm
luci-app-bmx6/files/www/cgi-bin/bmx6-info

index cb5642ed92551d1760d6d4a2c19db041b0a38bcf..26e1cb37fb8d3d933f7c5c508b713441a79d9532 100644 (file)
@@ -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
index 65e62d7a7dedc6076f274c01b39e21b91462f0fc..77b9ed11c555fb00d64b12c44ee4b784a4ea7da3 100644 (file)
@@ -20,7 +20,7 @@
        <table>
        <tr><th colspan="2">
                <span style="color:grey;font-weight:700;text-align:left;">
-               <%=l.globalId%>
+               <%=l.name%>
                <br />
                </span>
        </th></tr>
index d4cc38b680620360131534c7bb4398721a2017a7..92b22a97d7ffdba35318e0e57c671283408f0cee 100644 (file)
                        <th class="cbi-section-table-cell"><%:Network%></th>
                        <th class="cbi-section-table-cell"><%:Bandwidth%></th>
                        <th class="cbi-section-table-cell"><%:SearchNet%></th>
-                       <th class="cbi-section-table-cell"><%:Type%></th>
                        <th class="cbi-section-table-cell"><%:Path Metric%></th>
-                       <th class="cbi-section-table-cell"><%:IP metric%></th>
                        <th class="cbi-section-table-cell"><%:Tun metric%></th>
-                       <th class="cbi-section-table-cell"><%:Bonus%></th>
+                       <th class="cbi-section-table-cell"><%:Rating%></th>
                        <th class="cbi-section-table-cell"><%:Src%></th>
                        <th class="cbi-section-table-cell"><%:Search id%></th>
                </tr>
@@ -97,8 +95,8 @@
                        if ( tunnel.tunName != "---" ) status = '<img src="'+tunicon+'"/>';
                        if ( advnet == "0.0.0.0/0" ) advnet = "<b>Internet</b>";
 
-                       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;
                });
index 931cbf68a4b4545246751e8cfc946fc7eeb93e33..37ff25af557a3f3bf7ee222a926709c97204eca6 100644 (file)
@@ -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