diff --git a/geofeed.csv b/geofeed.csv index 293fa35..e11e09e 100644 --- a/geofeed.csv +++ b/geofeed.csv @@ -3,5 +3,4 @@ fdfe:8d0:7450:200::/56,DE,DE-BY,Nuremberg, fdfe:8d0:7450:300::/56,PL,PL-14,Warsaw, fdfe:8d0:7450:400::/56,FR,FR-IDF,Paris, fdfe:8d0:7450:500::/56,SE,SE-AB,Stockholm, -fdfe:8d0:7450:700::/56,DE,DE-HE,Frankfurt, fdfe:8d0:7450:ffff::/64,,,, diff --git a/nodes.md b/nodes.md index 30874d9..bc7c2b7 100644 --- a/nodes.md +++ b/nodes.md @@ -8,13 +8,13 @@ Prefix hostname with `ipv4.` to force IPv4 \ ### Amsterdam, Netherlands - `nl1.420129.xyz` 500 Mbps (v6 + v4) -- Public key: `iZfLBtF6BiQvdKXx4Yl02u+OL6ls35gSpWCRmB9q4lU=` +- Public key: `m724+s6dks1bHZbEj9JvQb17mAC45z1WkaHSTSgxcRk=` - Link local: `fe80::129:1` - Pingable: `fdfe:8d0:7450:100::1` ### Nuremberg, Germany - `de1.420129.xyz` 1 Gbps (v6 + v4) -- Public key: `N9rGceoiFcc/obnHrqMAmVlrb/E2Br55+doekTKwNF8=` +- Public key: `m724+jzo06ECw9TEGEqaJcF6lCk63z8I3k4KDg9sxwM=` - Link local: `fe80::129:2` - Pingable: `fdfe:8d0:7450:200::1` - Provider: [Advin Servers](https://clients.advinservers.com/aff.php?aff=323) @@ -37,11 +37,4 @@ Prefix hostname with `ipv4.` to force IPv4 \ - Public key: `m724+na8merDXnOAWbFDJPhzyujDekX8vR5Ibgt4oyY=` - Link local: `fe80::129:5` - Pingable: `fdfe:8d0:7450:500::1` -- Provider: [No Ack Hosting](https://order.noackhosting.se/?affid=1) - -### Frankfurt, Germany -- **(!) Unstable right now** -- `de2.420129.xyz` 100 Mbps (v6 + v4) -- Public key: `VJMKJEuteSa9izj5f+bUD8bhQL99NnITnxyy0+1Gblw=` -- Link local: `fe80::129:7` -- Pingable: `fdfe:8d0:7450:700::1` +- Provider: [No Ack Hosting](https://order.noackhosting.se/?affid=1) \ No newline at end of file diff --git a/src/map/index.html b/src/map/index.html index 6e3eb34..3344450 100644 --- a/src/map/index.html +++ b/src/map/index.html @@ -13,8 +13,10 @@
diff --git a/src/map/map.js b/src/map/map.js index 4b2bb63..818ebed 100644 --- a/src/map/map.js +++ b/src/map/map.js @@ -4,28 +4,22 @@ import 'leaflet/dist/leaflet.css'; import 'leaflet-defaulticon-compatibility'; import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css'; -var map = L.map('map', { +/* ------ */ + +const map = L.map('map', { minZoom: 5, maxZoom: 8, worldCopyJump: true }).setView([50,18], 5); -L.tileLayer('https://tforwarder.b-cdn.net/spinal-map/{z}/{x}/{y}.png?apikey={apikey}', { - attribution: '© Thunderforest, © OpenStreetMap contributors', - apikey: 'db5ae1f5778a448ca662554581f283c5', -}).addTo(map); - -var de1t = [50.085448739143715, 8.461733038044116]; - -// title, hostname, popup, location -var nodes = { +const nodes = { pl1: { country: 'pl', location: [52.1904441909767, 20.922122237417636], city: "Warsaw, Poland", hostname: "pl1.420129.xyz", datacenter: "equinix wa3", - description: `` + description: `Eastern Europe presence` }, de1: { country: 'de', @@ -33,7 +27,7 @@ var nodes = { city: "Nuremberg, Germany", hostname: "de1.420129.xyz", datacenter: "Hetzner", - description: `` + description: `Central Europe presence` }, nl1: { country: 'nl', @@ -41,7 +35,7 @@ var nodes = { city: "Amsterdam, Netherlands", hostname: "nl1.420129.xyz", datacenter: "oracle cloud eu-amsterdam-1", - description: `` + description: `Western Europe presence` }, fr1: { country: 'fr', @@ -49,7 +43,7 @@ var nodes = { city: "Paris, France", hostname: "fr1.420129.xyz", datacenter: "scaleway PAR 1", - description: `` + description: `France presence` }, se1: { country: 'se', @@ -57,65 +51,64 @@ var nodes = { city: "Stockholm, Sweden", hostname: "fr1.420129.xyz", datacenter: "unknown", - description: `` - }, - de2: { - country: 'de', - location: [50.0968987, 8.6441317], - city: "Frankfurt, Germany", - hostname: "de2.420129.xyz", - datacenter: "Equinix FR7", - description: `` - }, + description: `Nordic presence` + } } -function line(from, to, popup) { - L.polyline([from, to], {opacity: 0.5}).addTo(map).bindPopup(popup); -} +const connections = [ + { from: 'nl1', to: 'se1', latency: 20 }, + { from: 'nl1', to: 'de1', latency: 10 }, + { from: 'nl1', to: 'fr1', latency: 10 }, + { from: 'de1', to: 'pl1', latency: 25 }, +]; +/* ------ */ + +L.tileLayer('https://tforwarder.b-cdn.net/spinal-map/{z}/{x}/{y}.png?apikey={apikey}', { + attribution: '© Thunderforest, © OpenStreetMap contributors', + apikey: 'db5ae1f5778a448ca662554581f283c5', +}).addTo(map); var opened = null; const sidebarContent = document.getElementById("sidebarContent"); -const nodesElement = document.getElementById("nodes"); +const nodeListElement = document.getElementById("nodeList"); + function dismissPopup(hideMarker) { - console.log('dismissing') + console.log('dismissPopup'); + if (opened == null) return; - const popup = opened[0]; - const rect = opened[1].getBoundingClientRect(); + const popupElement = opened.popupElement; + const rect = opened.clickedElement.getBoundingClientRect(); - console.log('a') - //sidebarContent.removeChild(opened); - popup.offsetHeight; - popup.style.height = rect.height - 20 + 'px'; - popup.style.transform = 'none'; - nodesElement.style.opacity = 1; + popupElement.style.height = rect.height - 20 + 'px'; + popupElement.style.transform = 'none'; + + nodeListElement.style.opacity = 1; sidebarContent.style.backgroundColor = null; opened = null; if (hideMarker) map.closePopup(); setTimeout(() => { - sidebarContent.removeChild(popup); - }, 300); + sidebarContent.removeChild(popupElement); + }, 300); + + console.log("Popup dismissed"); }; -//map.on('popupClose', dismissPopup); -sidebarContent.onclick = dismissPopup; +function onSidebarNodeClick(node, clickedElement) { + console.log('onSidebarNodeClick', node, opened); -function onNodeClick(ev, node, clicked) { - console.log('b') - console.log(opened) - if (opened != null) { - return; - } - const rect = clicked.getBoundingClientRect(); + if (opened != null) return; - nodesElement.style.opacity = 0; + const rect = clickedElement.getBoundingClientRect(); + + nodeListElement.style.opacity = 0; - let ele = clicked.cloneNode(true); + let ele = clickedElement.cloneNode(true); ele.innerHTML += `