From 0880159eb5bc279421ebceeb63f3e81b55820c5f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 8 Jan 2016 14:54:30 +0100 Subject: [PATCH] gluon-status-page: fix handling of interface names containing dots --- .../gluon-status-page/src/js/lib/gui/neighbours.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package/gluon-status-page/src/js/lib/gui/neighbours.js b/package/gluon-status-page/src/js/lib/gui/neighbours.js index 3c2aaca7..396c56fe 100644 --- a/package/gluon-status-page/src/js/lib/gui/neighbours.js +++ b/package/gluon-status-page/src/js/lib/gui/neighbours.js @@ -225,6 +225,12 @@ function (Helper, SignalGraph, Signal) { return !(a < b || a > b) } + function getter(k) { + return function(obj) { + return obj[k] + } + } + return function (nodeInfo, stream, mgmtBus) { var stopStream, div @@ -252,9 +258,10 @@ function (Helper, SignalGraph, Signal) { remove.forEach(function (d) { div.removeChild(d) }) - for (var k in d) + for (var k in d) { if (!(k in have)) - new Interface(div, nodeInfo, k, stream.map("." + k), mgmtBus) + new Interface(div, nodeInfo, k, stream.map(getter(k)), mgmtBus) + } } }