-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
94 lines (87 loc) · 2.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>The Onion Router - Coderi : Inteligência Empresarial</title>
<link rel="icon" href="https://www.torproject.org/images/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="node_modules/jvectormap-next/jquery-jvectormap.css">
<style>
html {
height: 100%;
}
body {
height:97%;
padding: 0;
margin: 0;
font-family: 'Noto Sans', sans-serif;
color: #333;
}
#mapaMundial {
width: 100%;
height: 92%;
color: #888;
}
.center{
text-align: center;
}
a {
text-decoration: none;
color: #28b67a;
}
</style>
</head>
<body>
<p class="center"><strong>Tor Project (Network Relays)</strong> | <a href="http://coderi.com.br/2018/04/01/fluxo-de-trafego-na-rede-tor/">Coderi : Inteligência Empresarial</a> + <a href="http://blutmagie.de/index.php?SR=CountryCode&SO=Asc">Blutmagie</a> | <span id="date">...</span></p>
<div id="mapaMundial" class="center"></div>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/jvectormap-next/jquery-jvectormap.min.js"></script>
<script src="node_modules/jvectormap-next/tests/assets/jquery-jvectormap-world-mill-en.js"></script>
<script>
var idMapa = '#mapaMundial';
$(function(){
$.get('torNodes.json', function(result){
if(result.data && result.date){
var gdpData = result.data;
var gdpDate = result.date;
$('#date').text(gdpDate);
$(idMapa).vectorMap({
map: 'world_mill_en',
zoomMax: 1,
zoomButtons : false,
backgroundColor: '#f7f7f7f',
series: {
regions: [{
values: gdpData,
scale: ['#badc58', '#64A548'], //Fraco-Forte
normalizeFunction: 'polynomial',
legend: {
title: 'Tor (Network Relays) - ' + gdpDate,
vertical: false
}
}]
},
regionStyle: {
initial: {
fill: '#95afc0'
},
hover: {
fill: "#535c68"
}
},
onRegionTipShow: function(e, el, code){
if(gdpData[code]){
el.html(el.html()+' <br/>- Relays found: ' + gdpData[code]);
}
}
});
} else {
$(idMapa).text('JSON invalid format... Check the "torNodes.json" file or run export again.');
}
}).fail(function(){
$(idMapa).text('Could not process the data... Run the "npm run export" command to perform the import, so refresh the page.');
});
});
</script>
</body>
</html>