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 <p4u@dabax.net>
This commit is contained in:
parent
a8313faa28
commit
a110cfccd5
4 changed files with 7 additions and 9 deletions
|
@ -69,7 +69,7 @@ function index()
|
||||||
entry(place,call("action_nodes_j"),"Nodes",1)
|
entry(place,call("action_nodes_j"),"Nodes",1)
|
||||||
table.remove(place)
|
table.remove(place)
|
||||||
|
|
||||||
--- links
|
--- links
|
||||||
table.insert(place,"Links")
|
table.insert(place,"Links")
|
||||||
entry(place,call("action_links"),"Links",2).leaf = true
|
entry(place,call("action_links"),"Links",2).leaf = true
|
||||||
table.remove(place)
|
table.remove(place)
|
||||||
|
@ -204,7 +204,7 @@ function action_links(host)
|
||||||
devlinks[l.viaDev] = {}
|
devlinks[l.viaDev] = {}
|
||||||
end
|
end
|
||||||
for _,l in ipairs(links) do
|
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)
|
table.insert(devlinks[l.viaDev],l)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<table>
|
<table>
|
||||||
<tr><th colspan="2">
|
<tr><th colspan="2">
|
||||||
<span style="color:grey;font-weight:700;text-align:left;">
|
<span style="color:grey;font-weight:700;text-align:left;">
|
||||||
<%=l.globalId%>
|
<%=l.name%>
|
||||||
<br />
|
<br />
|
||||||
</span>
|
</span>
|
||||||
</th></tr>
|
</th></tr>
|
||||||
|
|
|
@ -66,11 +66,9 @@
|
||||||
<th class="cbi-section-table-cell"><%:Network%></th>
|
<th class="cbi-section-table-cell"><%:Network%></th>
|
||||||
<th class="cbi-section-table-cell"><%:Bandwidth%></th>
|
<th class="cbi-section-table-cell"><%:Bandwidth%></th>
|
||||||
<th class="cbi-section-table-cell"><%:SearchNet%></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"><%: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"><%: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"><%:Src%></th>
|
||||||
<th class="cbi-section-table-cell"><%:Search id%></th>
|
<th class="cbi-section-table-cell"><%:Search id%></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -97,8 +95,8 @@
|
||||||
if ( tunnel.tunName != "---" ) status = '<img src="'+tunicon+'"/>';
|
if ( tunnel.tunName != "---" ) status = '<img src="'+tunicon+'"/>';
|
||||||
if ( advnet == "0.0.0.0/0" ) advnet = "<b>Internet</b>";
|
if ( advnet == "0.0.0.0/0" ) advnet = "<b>Internet</b>";
|
||||||
|
|
||||||
res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net, tunnel.advType,
|
res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net,
|
||||||
tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.srcIngress, tunnel.id]);
|
tunnel.pathMtc, tunnel.tunMtc, tunnel.rating, tunnel.srcIngress, tunnel.id]);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
|
|
|
@ -97,7 +97,7 @@ if [ "$QUERY" == '$neighbours' ]; then
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
else if [ "$QUERY" == '$tunnels' ]; then
|
else if [ "$QUERY" == '$tunnels' ]; then
|
||||||
bmx6 -c --jshow tunnels
|
bmx6 -c --jshow tunnels /r=0
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue