|
|
@ -62,7 +62,6 @@
|
|
|
|
<div id="map" class="map"></div>
|
|
|
|
<div id="map" class="map"></div>
|
|
|
|
<div id="popup" class="popup" title="Welcome to OpenLayers"></div>
|
|
|
|
<div id="popup" class="popup" title="Welcome to OpenLayers"></div>
|
|
|
|
<p>Found Peers (via source node, levin p2p): {{ peers | length }}</p>
|
|
|
|
<p>Found Peers (via source node, levin p2p): {{ peers | length }}</p>
|
|
|
|
<p>Added Nodes (Monero mainnet): {{ nodes | length }}</p>
|
|
|
|
|
|
|
|
<p>Source Node: {{ source_node }}</p>
|
|
|
|
<p>Source Node: {{ source_node }}</p>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
This is not a full representation of the entire Monero network,
|
|
|
|
This is not a full representation of the entire Monero network,
|
|
|
@ -112,53 +111,29 @@
|
|
|
|
// Define a circle marker
|
|
|
|
// Define a circle marker
|
|
|
|
var circle = new ol.style.Style({
|
|
|
|
var circle = new ol.style.Style({
|
|
|
|
image: new ol.style.Circle({
|
|
|
|
image: new ol.style.Circle({
|
|
|
|
radius: 4,
|
|
|
|
radius: 5,
|
|
|
|
fill: new ol.style.Fill({
|
|
|
|
fill: new ol.style.Fill({
|
|
|
|
color: 'rgba(76,76,76,0.7)',
|
|
|
|
color: 'rgba(76,76,76,.75)',
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
stroke: new ol.style.Stroke({
|
|
|
|
stroke: new ol.style.Stroke({
|
|
|
|
color: 'rgba(53,53,53,0.7)',
|
|
|
|
color: 'rgba(53,53,53,.75)',
|
|
|
|
width: 1
|
|
|
|
width: 1
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var circle2 = new ol.style.Style({
|
|
|
|
|
|
|
|
image: new ol.style.Circle({
|
|
|
|
|
|
|
|
radius: 8,
|
|
|
|
|
|
|
|
fill: new ol.style.Fill({
|
|
|
|
|
|
|
|
color: 'rgba(255,102,0,0.5)',
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
stroke: new ol.style.Stroke({
|
|
|
|
|
|
|
|
color: 'rgba(204,81,0,0.5)',
|
|
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% for peer in peers %}
|
|
|
|
{% for peer in peers %}
|
|
|
|
var feature = new ol.Feature(
|
|
|
|
var feature = new ol.Feature(
|
|
|
|
new ol.geom.Point(ol.proj.transform(['{{ peer.lon }}', '{{ peer.lat }}'], 'EPSG:4326', 'EPSG:3857'))
|
|
|
|
new ol.geom.Point(ol.proj.transform(['{{ peer.lon }}', '{{ peer.lat }}'], 'EPSG:4326', 'EPSG:3857'))
|
|
|
|
);
|
|
|
|
);
|
|
|
|
feature.description = [
|
|
|
|
feature.description = [
|
|
|
|
'Peer {{ peer.get_ip() }}',
|
|
|
|
'Peer {{ peer.url }}',
|
|
|
|
'Last seen {{ peer.datetime }}'
|
|
|
|
'Last seen {{ peer.datetime }}'
|
|
|
|
];
|
|
|
|
];
|
|
|
|
feature.setStyle(circle);
|
|
|
|
feature.setStyle(circle);
|
|
|
|
markerLayer.getSource().addFeature(feature);
|
|
|
|
markerLayer.getSource().addFeature(feature);
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
{% for peer in nodes %}
|
|
|
|
|
|
|
|
var feature = new ol.Feature(
|
|
|
|
|
|
|
|
new ol.geom.Point(ol.proj.transform(['{{ peer[0] }}', '{{ peer[1] }}'], 'EPSG:4326', 'EPSG:3857'))
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
feature.description = [
|
|
|
|
|
|
|
|
'Node {{ peer[2] }}',
|
|
|
|
|
|
|
|
'Last seen {{ peer[3] }}'
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
feature.setStyle(circle2);
|
|
|
|
|
|
|
|
markerLayer.getSource().addFeature(feature);
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Setup popup
|
|
|
|
// Setup popup
|
|
|
|
var popup = new ol.Overlay({
|
|
|
|
var popup = new ol.Overlay({
|
|
|
|
element: $('#popup')[0],
|
|
|
|
element: $('#popup')[0],
|
|
|
|