X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=luci-app-bmx6%2Ffiles%2Fusr%2Flib%2Flua%2Fluci%2Fcontroller%2Fbmx6.lua;h=9529cf882a68884ffd40e133e1306d6f3eb9cc67;hb=6beba22a4d96eb0d40132298885e0b7da6741210;hp=26e1cb37fb8d3d933f7c5c508b713441a79d9532;hpb=5366e549dd3ffbbd98bce0366e4c0be7f474574a;p=lede-routing%2F.git 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 26e1cb3..9529cf8 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 @@ -240,10 +240,10 @@ function action_topology() if first then first = false else - topology = topology .. ', ' + topology = topology .. ', ' end - topology = topology .. '{ "globalId": "%s", "links": [' %o.globalId:match("^[^%.]+") + topology = topology .. '{ "name": "%s", "links": [' %o.name local first2 = true @@ -252,10 +252,10 @@ function action_topology() first2 = false else topology = topology .. ', ' - end - - topology = topology .. '{ "globalId": "%s", "rxRate": %s, "txRate": %s }' - %{ l.globalId:match("^[^%.]+"), l.rxRate, l.txRate } + end + name = l.name or l.llocalIp or "unknown" + topology = topology .. '{ "name": "%s", "rxRate": %s, "txRate": %s }' + %{ name, l.rxRate, l.txRate } end