Merge branch 'master' into bmx6_testing

Conflicts:
	bmx6/Makefile
This commit is contained in:
Pau Escrich 2014-02-25 18:17:10 +01:00
commit 19e7821e9e
3 changed files with 13 additions and 13 deletions

View file

@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git
#PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://bmx6.net/bmx6.git
PKG_SOURCE_URL:=git://github.com/axn/bmx6.git PKG_SOURCE_URL:=git://github.com/axn/bmx6.git
PKG_REV:=60e1cd8ab8a8ec6259f8cae4748f0cdd63b2c5f2 PKG_REV:=66338bf2be0b081ef4a6ed4d75e4d8b8f13a4d9c
PKG_VERSION:=r2014013001 PKG_VERSION:=r2014022501
PKG_RELEASE:=4 PKG_RELEASE:=4
PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_VERSION:=$(PKG_REV)

View file

@ -240,10 +240,10 @@ function action_topology()
if first then if first then
first = false first = false
else else
topology = topology .. ', ' topology = topology .. ', '
end end
topology = topology .. '{ "globalId": "%s", "links": [' %o.globalId:match("^[^%.]+") topology = topology .. '{ "name": "%s", "links": [' %o.name
local first2 = true local first2 = true
@ -252,10 +252,10 @@ function action_topology()
first2 = false first2 = false
else else
topology = topology .. ', ' topology = topology .. ', '
end end
name = l.name or l.llocalIp or "unknown"
topology = topology .. '{ "globalId": "%s", "rxRate": %s, "txRate": %s }' topology = topology .. '{ "name": "%s", "rxRate": %s, "txRate": %s }'
%{ l.globalId:match("^[^%.]+"), l.rxRate, l.txRate } %{ name, l.rxRate, l.txRate }
end end

View file

@ -57,20 +57,20 @@ the file called "COPYING".
for (var i = 0; i < (data.length); i++) for (var i = 0; i < (data.length); i++)
{ {
// node->node // node->node
if (data[i].globalId) if (data[i].name)
{ {
for (var j = 0; j < (data[i].links.length); j++) for (var j = 0; j < (data[i].links.length); j++)
{ {
var key = (data[i].globalId < data[i].links[j].globalId) var key = (data[i].name < data[i].links[j].name)
? data[i].globalId + '|' + data[i].links[j].globalId ? data[i].name + '|' + data[i].links[j].name
: data[i].links[j].globalId + '|' + data[i].globalId; : data[i].links[j].name + '|' + data[i].name;
var rxRate = data[i].links[j].rxRate; var rxRate = data[i].links[j].rxRate;
var txRate = data[i].links[j].txRate; var txRate = data[i].links[j].txRate;
if (!seen[key] && rxRate>0 && txRate>0) if (!seen[key] && rxRate>0 && txRate>0)
{ {
g.addEdge(data[i].globalId, data[i].links[j].globalId, g.addEdge(data[i].name, data[i].links[j].name,
{ label: rxRate + '/' + txRate, { label: rxRate + '/' + txRate,
directed: false, stroke: '#aaaaaa', fill: '#ffffff', directed: false, stroke: '#aaaaaa', fill: '#ffffff',
'label-style': { 'font-size': 8 }}); 'label-style': { 'font-size': 8 }});