From ca7c2ff3b367a3fe432fef2c11b515edc4b9013d Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 12 May 2019 14:17:00 +0200 Subject: [PATCH] router.html: Fix MAC addresses in neighbor graph This adds a JavaScript function for integer to MAC address conversion. Signed-off-by: Adrian Schmutzler --- ffmap/web/static/js/graph.js | 4 +++- ffmap/web/static/js/util.js | 6 ++++++ ffmap/web/templates/router.html | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ffmap/web/static/js/util.js diff --git a/ffmap/web/static/js/graph.js b/ffmap/web/static/js/graph.js index 25d9580..87770be 100644 --- a/ffmap/web/static/js/graph.js +++ b/ffmap/web/static/js/graph.js @@ -105,10 +105,12 @@ function neighbour_graph(neigh_label) { for (var j in neigh_stats) { var dataset = neigh_stats[j]; - var label = j; + var label; var data = []; if(j in neigh_label) { label = neigh_label[j]; + } else { + label = int2mac(j); } for (len=dataset.length, i=0; i +