@@ -1496,6 +1496,10 @@ function renderDashboard(d) {
let ixh = '
';
ixh += '
' + ix.total_connections + '
Connections
';
ixh += '
' + ix.unique_ixps + '
Unique IXPs
';
+ // Total capacity across all IX ports
+ var totalMbps = (ix.connections || []).reduce(function(s, c) { return s + (c.speed_mbps || 0); }, 0);
+ var capLabel = totalMbps >= 1000000 ? (totalMbps/1000000).toFixed(2) + ' Tbps' : totalMbps >= 1000 ? (totalMbps/1000).toFixed(0) + ' Gbps' : totalMbps + ' Mbps';
+ ixh += '
' + capLabel + '
IX Capacity
';
ixh += '
';
if (ix.connections && ix.connections.length > 0) {
@@ -3873,11 +3877,15 @@ function loadNewFeatures(asn) {
loadRpkiHistory(asn);
loadAspath(asn);
loadHijackMonitor(asn);
- // IXP picker: pass all IXPs from PeeringDB data
+ // IXP picker: read from ix_presence.connections (the actual API response structure)
setTimeout(() => {
const raw = currentLookupData || {};
- const pdb = raw.peeringdb || {};
- const ixList = (pdb.ix || []).map(ix => ({ ix_id: ix.ix_id || ix.id, name: ix.name, city: ix.city })).filter(ix => ix.ix_id);
+ const conns = (raw.ix_presence && raw.ix_presence.connections) || [];
+ // Deduplicate by ix_id (one entry per unique IXP)
+ const seen = new Set();
+ const ixList = conns
+ .filter(c => c.ix_id && !seen.has(c.ix_id) && seen.add(c.ix_id))
+ .map(c => ({ ix_id: c.ix_id, name: c.ix_name, city: c.city }));
loadIxPicker(ixList);
}, 300);
}