2 Copyright
2018 Dirk Brenken (dev@brenken.org)
3 This is free software, licensed under the Apache License, Version
2.0
9 <script type=
"text/javascript">
13 var query = div_ripe.querySelector(
"#s_ripe").value;
14 var output = document.getElementById(
"ripe_desc");
18 output.innerHTML =
"<%:This data call returns geolocation information for the given IP space, or for announced IP prefixes in the case of ASNs.%>";
21 output.innerHTML =
"<%:This data call shows general informations about an ASN like its announcement status and the name of its holder according to the WHOIS service.%>";
23 case
"announced-prefixes":
24 output.innerHTML =
"<%:This data call returns all announced prefixes for a given ASN.%>";
27 output.innerHTML =
"<%:This data call returns the containing prefix and announcing ASN of a given IP address.%>";
29 case
"country-resource-list":
30 output.innerHTML =
"<%:This data call lists the Internet resources associated with a country, including ASNs, IPv4 ranges and IPv4/6 CIDR prefixes.%>";
33 output.innerHTML =
"<%:This data call returns whois information from the relevant Regional Internet Registry and Routing Registry.%>";
36 output.innerHTML =
"<%:This data call returns the recursive chain of DNS forward (A/AAAA/CNAME) and reverse (PTR) records starting form either a hostname or an IP address.%>";
38 case
"iana-registry-info":
39 output.innerHTML =
"<%:This data call gives access to various data sources maintained by IANA.%>";
42 output.innerHTML =
"";
48 var query = div_ripe.querySelector(
"#s_ripe").value;
49 var input = document.getElementById(
"ripe_input");
50 var view = document.getElementById(
"view_id");
56 view.value =
"<%:Loading ...%>";
58 new XHR().get('<%=luci.dispatcher.build_url(
"admin",
"services",
"banip")%
>/ripeview/' + query +
"/" + input.value, null,
63 view.value =
"<%:No response!%>";
66 view.value = x.responseText;
69 window.onload = ripe_desc;
74 <div class=
"cbi-section">
75 <div class=
"cbi-section-descr"><%_The RIPEstat Data API is the public data interface provided by RIPE NCC, for details look
<a href=
"https://stat.ripe.net/docs/data_api" target=
"_blank" rel=
"noopener noreferrer">here
</a>.%
></div>
76 <div class=
"cbi-section-node">
77 <div class=
"table cbi-section-table">
78 <div class=
"tr cbi-section-table-row">
80 <input class=
"cbi-input-text" style=
"width:20em" type=
"text" id=
"ripe_input" placeholder=
"<%:Enter IP/CIDR/ASN/ISO%>" value=
"" />
83 <div class=
"tr cbi-section-table-row" id=
"div_ripe">
85 <select id=
"s_ripe" class=
"cbi-input-select cbi-button" style=
"width:15em" onchange=
"ripe_desc()">
86 <option value=
"geoloc" selected=
"selected"><%:Geo Location%
></option>
87 <option value=
"as-overview"><%:ASN Overview%
></option>
88 <option value=
"announced-prefixes"><%:ASN Prefixes%
></option>
89 <option value=
"network-info"><%:IP/ASN Mapping%
></option>
90 <option value=
"country-resource-list"><%:Country Resources%
></option>
91 <option value=
"whois"><%:Whois Information%
></option>
92 <option value=
"dns-chain"><%:DNS Chain%
></option>
93 <option value=
"iana-registry-info"><%:IANA Information%
></option>
95 <input type=
"button" id=
"bt_load" value=
"<%:Load%>" onclick=
"ripe_view()" class=
"cbi-button cbi-button-add" /><br /><br />
96 <span class=
"ripe_desc" id=
"ripe_desc"></span>
101 <textarea id=
"view_id" readonly=
"readonly" wrap=
"off" value=
""></textarea>