From 5b53e0fb20b345c6de65d8e988e715b1932375a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Mon, 17 Dec 2018 06:48:40 +0200 Subject: [PATCH 1/5] Temporary Internet Addresses CWINFO (@cwinfo) ------------------------- cloudberry.fr1.servers.devices.cwinfo.net fr2.servers.devices.cwinfo.net Nginx Reverse Proxy https://yggdrasil-map.cwo.fi -> http://[21f:dd73:7cdb:773b:a924:7ec0:800b:221e]:80/ https://yggdrasil-map.h.cwo.fi -> http://[21f:dd73:7cdb:773b:a924:7ec0:800b:221e]:80/ https://yggdrasil-map.y.cwo.fi -> http://[21f:dd73:7cdb:773b:a924:7ec0:800b:221e]:80/ --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1067e46..7977e60 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Yggdrasil map + * Internet: https://yggdrasil-map.cwo.fi + * Hyperboria: https://yggdrasil-map.h.cwo.fi + * Yggdrasil Network: https://yggdrasil-map.y.cwo.fi + Forked from the code for http://www.fc00.org (http://h.fc00.org on Hyperboria). ## Sending your view of the network From 275f0dc3ee543e9c75ec07ab8ef49459708b7035 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Mon, 17 Dec 2018 18:39:27 -0600 Subject: [PATCH 2/5] use labels from nodeinfo if they're defined --- web/graphPlotter.py | 2 ++ web/updateGraph.py | 1 + 2 files changed, 3 insertions(+) diff --git a/web/graphPlotter.py b/web/graphPlotter.py index dc3fb9c..dd014be 100644 --- a/web/graphPlotter.py +++ b/web/graphPlotter.py @@ -65,6 +65,8 @@ def get_graph_json(G): centrality = centralities.get(n.name, 0) size = 5*(1 + 1*centrality) name = db.get(canonalize_ip(n.name)) + # If label isn't the default value, set name to that instead + if n.attr['label'] != n.name.split(':')[-1]: name = n.attr['label'] out_data['nodes'].append({ 'id': n.name, diff --git a/web/updateGraph.py b/web/updateGraph.py index f445cbc..25b3776 100755 --- a/web/updateGraph.py +++ b/web/updateGraph.py @@ -35,6 +35,7 @@ def generate_graph(time_limit=60*60*3): toAdd = [] for ip in data: info = NodeInfo(ip, data[ip][0]) + if len(data[ip]) >= 3: info.label = data[ip][2] toAdd.append(info) nodes = dict() From 71d3e89bc8399d8dbfc48c97f71fba4e9acaf36f Mon Sep 17 00:00:00 2001 From: Arceliar Date: Mon, 17 Dec 2018 19:22:16 -0600 Subject: [PATCH 3/5] update about page to reference NodeInfo --- web/templates/about.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/about.html b/web/templates/about.html index 5045820..000845b 100644 --- a/web/templates/about.html +++ b/web/templates/about.html @@ -8,7 +8,7 @@

Network map

-

The network page has a map of Yggdrasil's spanning tree as it is now. The map is not complete since it is hard/impossible to get a full picture of the network, and it only includes the minimum subset of links needed to construct the spanning tree. The known nodes and tree coordinates are taken from Yakamo's API. Node names are taken from Yakamo's node list.

+

The network page has a map of Yggdrasil's spanning tree as it is now. The map is not complete since it is hard/impossible to get a full picture of the network, and it only includes the minimum subset of links needed to construct the spanning tree. The known nodes and tree coordinates are taken from Yakamo's API. Node names are taken from the "name" field of a node's NodeInfo (if it was configured), or from Yakamo's node list as a fallback.