forked from NLNOG/nlnogbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (100 loc) · 4.77 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
95
96
97
98
99
100
101
102
103
104
105
106
<html>
<head>
<title>NLNOGbook</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/flag-icon.min.css">
</head>
<body>
<div class="container">
<h1 class="page-header">NLNOGbook</h1>
<p>This page was created to keep track of the members in the <a href="https://nlnog.net/" target="_blank">NLNOG</a>
community.</p>
<p>You can add yourself to the list by creating a Pull Request on <a href="https://github.com/casdr/nlnogbook"
target="_blank">GitHub</a></p>
<table class="table table-sm table-striped">
<thead>
<tr>
<th>Nick</th>
<th>Full name</th>
<th>Company</th>
<th>ASN</th>
<th>RIR Handle</th>
<th>Country</th>
</tr>
</thead>
<tbody id="list"></tbody>
</table>
<hr/>
<p>Created by <a href="http://reuver.co/~cas">Cas de Reuver</a>. This page is not affiliated with Stichting NLNOG.
</p>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js-yaml.min.js"></script>
<script>
var defaults = {full_name: '', companies: [], country: '', rir_handle: ''};
$(document).ready(function () {
$.get('data/companies.yml?' + (new Date()).getTime(), function (companies_yml) {
var companies = jsyaml.load(companies_yml);
$.get('data/users.yml?' + (new Date()).getTime(), function (users_yml) {
var users = jsyaml.load(users_yml);
for (var name in users) {
var newUser = $('<tr />');
var user = users[name];
for (var key in defaults) {
if (!user.hasOwnProperty(key)) {
user[key] = defaults[key];
}
}
newUser.append('<td>' + name + '</td>');
newUser.append('<td>' + user.full_name + '</td>');
var companyStr = $('<td />');
var asnStr = $('<td />');
for (var comp in user.companies) {
var company = companies[user.companies[comp]];
if (company) {
var tmpStr = '';
if(company.site) {
tmpStr = '<a href="' + company.site + '" target="_blank">';
}
tmpStr += company.name;
if (company.site) {
tmpStr += '</a>';
}
companyStr.append(tmpStr+ '<br />');
if (company.asn) {
if(!Array.isArray(company.asn)) {
company.asn = [company.asn];
}
companyCounter = 0;
for (var asn in company.asn) {
var asn = company.asn[asn];
asnStr.append('<a href="https://apps.db.ripe.net/db-web-ui/lookup?source=ripe&key=AS' + asn + '&type=aut-num" target="_blank">AS' + asn + '</a><br />');
if(companyCounter > 0) {
companyStr.append('<br />');
}
companyCounter++;
}
} else {
asnStr.append('<br />');
}
} else {
companyStr.append(user.companies[comp] + '<br />');
}
}
newUser.append(companyStr);
newUser.append(asnStr);
newUser.append('<td><a href="https://apps.db.ripe.net/db-web-ui/#/lookup?source=ripe&key=' + user.rir_handle + '&type=person" target="_blank">' + user.rir_handle + '</a>');
var flag = $('<td />');
if (user.country) {
flag.append('<span class="flag-icon flag-icon-' + user.country + '" title="' + user.country + '"></span>');
}
newUser.append(flag);
$('#list').append(newUser);
}
});
})
});
</script>
</body>
</html>