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 cb5642e..26e1cb3 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 65e62d7..77b9ed1 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 d4cc38b..92b22a9 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 931cbf6..37ff25a 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