Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Add PeeringDB link to infopopup

Russ Garrettb7faefdb6dcf
diff --git a/web/src/popup/assets/peeringdb.png b/web/src/popup/assets/peeringdb.png
new file mode 100644
index 0000000..61ec58c
Binary files /dev/null and b/web/src/popup/assets/peeringdb.png differ
diff --git a/web/src/popup/infopopup.css b/web/src/popup/infopopup.css
index 0460f8c..aad84fb 100644
--- a/web/src/popup/infopopup.css
+++ b/web/src/popup/infopopup.css
@@ -99,3 +99,8 @@ div.gem_link {
background-size: 20px 20px;
background-image: url('./assets/gem.png');
}
+
+div.peeringdb_link {
+ background-size: 20px 20px;
+ background-image: url('./assets/peeringdb.png');
+}
diff --git a/web/src/popup/infopopup.ts b/web/src/popup/infopopup.ts
index 400c563..6324d34 100644
--- a/web/src/popup/infopopup.ts
+++ b/web/src/popup/infopopup.ts
@@ -429,6 +429,17 @@ class InfoPopup {
)
}
+ if (data['peeringdb_facility_id']) {
+ mount(
+ linksContainer,
+ el('a', el('div.ext_link.peeringdb_link'), {
+ href: `https://www.peeringdb.com/fac/${data['peeringdb_facility_id']}`,
+ target: '_blank',
+ title: 'PeeringDB'
+ })
+ )
+ }
+
mount(
linksContainer,
el('a', el('div.ext_link.wikidata_link'), {