summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-banip/luasrc/view/banip/ripeview.htm
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-11-10 11:19:50 +0100
committerDirk Brenken <dev@brenken.org>2018-11-10 11:19:50 +0100
commite50021f77fbc593cee841a02ad66c4bfea072f9e (patch)
treea768ced11497e719dd048965f86e43c30107d25b /applications/luci-app-banip/luasrc/view/banip/ripeview.htm
parent40de466475a617f42d1f5cfa03d0342676e84c9b (diff)
luci-app-banip: new package
for details & LuCI screenshots see base package desprition/PR: https://github.com/openwrt/packages/pull/7373 Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-banip/luasrc/view/banip/ripeview.htm')
-rw-r--r--applications/luci-app-banip/luasrc/view/banip/ripeview.htm105
1 files changed, 105 insertions, 0 deletions
diff --git a/applications/luci-app-banip/luasrc/view/banip/ripeview.htm b/applications/luci-app-banip/luasrc/view/banip/ripeview.htm
new file mode 100644
index 0000000000..118504fd65
--- /dev/null
+++ b/applications/luci-app-banip/luasrc/view/banip/ripeview.htm
@@ -0,0 +1,105 @@
+<%#
+Copyright 2018 Dirk Brenken (dev@brenken.org)
+This is free software, licensed under the Apache License, Version 2.0
+-%>
+
+<%+header%>
+<%+banip/banip_css%>
+
+<script type="text/javascript">
+//<![CDATA[
+ function ripe_desc()
+ {
+ var query = div_ripe.querySelector("#s_ripe").value;
+ var output = document.getElementById("ripe_desc");
+
+ switch (query) {
+ case "geoloc":
+ output.innerHTML = "<%:This data call returns geolocation information for the given IP space, or for announced IP prefixes in the case of ASNs.%>";
+ break;
+ case "as-overview":
+ 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.%>";
+ break;
+ case "announced-prefixes":
+ output.innerHTML = "<%:This data call returns all announced prefixes for a given ASN.%>";
+ break;
+ case "network-info":
+ output.innerHTML = "<%:This data call returns the containing prefix and announcing ASN of a given IP address.%>";
+ break;
+ case "country-resource-list":
+ output.innerHTML = "<%:This data call lists the Internet resources associated with a country, including ASNs, IPv4 ranges and IPv4/6 CIDR prefixes.%>";
+ break;
+ case "whois":
+ output.innerHTML = "<%:This data call returns whois information from the relevant Regional Internet Registry and Routing Registry.%>";
+ break;
+ case "dns-chain":
+ 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.%>";
+ break;
+ case "iana-registry-info":
+ output.innerHTML = "<%:This data call gives access to various data sources maintained by IANA.%>";
+ break;
+ default:
+ output.innerHTML = "";
+ }
+ }
+
+ function ripe_view()
+ {
+ var query = div_ripe.querySelector("#s_ripe").value;
+ var input = document.getElementById("ripe_input");
+ var view = document.getElementById("view_id");
+
+ if (!input.value)
+ {
+ return;
+ }
+ view.value = "<%:Loading ...%>";
+
+ new XHR().get('<%=luci.dispatcher.build_url("admin", "services", "banip")%>/ripeview/' + query + "/" + input.value, null,
+ function(x)
+ {
+ if (!x)
+ {
+ view.value = "<%:No response!%>";
+ return;
+ }
+ view.value = x.responseText;
+ });
+ }
+ window.onload = ripe_desc;
+//]]>
+</script>
+
+<div class="cbi-map">
+ <div class="cbi-section">
+ <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>
+ <div class="cbi-section-node">
+ <div class="table cbi-section-table">
+ <div class="tr cbi-section-table-row">
+ <div class="td left">
+ <input class="cbi-input-text" style="width:20em" type="text" id="ripe_input" placeholder="<%:Enter IP/CIDR/ASN/ISO%>" value="" />
+ </div>
+ </div>
+ <div class="tr cbi-section-table-row" id="div_ripe">
+ <div class="td left">
+ <select id="s_ripe" class="cbi-input-select cbi-button" style="width:15em" onchange="ripe_desc()">
+ <option value="geoloc" selected="selected"><%:Geo Location%></option>
+ <option value="as-overview"><%:ASN Overview%></option>
+ <option value="announced-prefixes"><%:ASN Prefixes%></option>
+ <option value="network-info"><%:IP/ASN Mapping%></option>
+ <option value="country-resource-list"><%:Country Resources%></option>
+ <option value="whois"><%:Whois Information%></option>
+ <option value="dns-chain"><%:DNS Chain%></option>
+ <option value="iana-registry-info"><%:IANA Information%></option>
+ </select>
+ <input type="button" id="bt_load" value="<%:Load%>" onclick="ripe_view()" class="cbi-button cbi-button-add" /><br /><br />
+ <span class="ripe_desc" id="ripe_desc"></span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <textarea id="view_id" readonly="readonly" wrap="off" value=""></textarea>
+ </div>
+</div>
+
+<%+footer%> \ No newline at end of file