Add reverse fetch to ASN IXP section

parent a1167884
......@@ -52,11 +52,14 @@
const htmlCode = addressHtmlArray.join(", ");
if(element.nodeName == "LI") {
if(element.nodeName == "LI" || (element.nodeName == "TD" && element.classList.contains("add-parenthesis")) ) {
if(htmlCode) {
element.innerHTML += ` (${htmlCode})`;
}
} else {
/**
* Used for "DNS" tab on /net/
*/
if(htmlCode) {
if(element.nodeName == "TD") {
$(element.parentElement).removeClass("d-none");
......
......@@ -59,6 +59,10 @@ twig.extendFunction("portSizeProcessor", (rawSize: string) => {
import txtParser from "./view-functions/txtParser";
twig.extendFunction("txtParser", txtParser);
twig.extendFunction("getReverse", (ipAddr: string): string => {
return "";
})
/**
* Is server in production mode?
*/
......
......@@ -100,8 +100,8 @@
<td><a href="/ix/{{ ix.ix_id }}">{{ ix.name }}</a></td>
{# <td>Unknown</td>
<td>Unknown</td> #}
<td><a href="/ip/{{ ix.ipaddr4 }}">{{ ix.ipaddr4 }}</a></td>
<td><a href="/ip/{{ ix.ipaddr6 }}">{{ ix.ipaddr6 }}</a></td>
<td class="ipRecord add-parenthesis" data-ip="{{ ix.ipaddr4 }}"><a href="/ip/{{ ix.ipaddr4 }}">{{ ix.ipaddr4 }}{{ getReverse(ix.ipaddr4) }}</a></td>
<td class="ipRecord add-parenthesis" data-ip="{{ ix.ipaddr6 }}"><a href="/ip/{{ ix.ipaddr6 }}">{{ ix.ipaddr6 }}{{ getReverse(ix.ipaddr4) }}</a></td>
<td data-order="{{ ix.speed }}">{{ portSizeProcessor(ix.speed) }}</td>
</tr>
{% endfor %}
......@@ -122,5 +122,8 @@
<script type="text/javascript" src="/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
{# TODO: Do in the backend due to ASNs that have large amount of IXPs #}
<script src="/assets/js/pages/dns/show/reverse-fetch.js" async defer></script>
<script src="/assets/js/pages/dns/show/whois.js" data-query="AS{{ asn }}"></script>
{% endblock %}
\ No newline at end of file
......@@ -115,6 +115,6 @@
{% block javascripts %}
<script src="/assets/js/pages/dns/show/whois.js" data-query="{{ domain }}"></script>
<script src="/assets/js/pages/dns/show/reverse-fetch.js"></script>
<script src="/assets/js/pages/dns/show/reverse-fetch.js" async defer></script>
{# <script src="/assets/js/pages/dns/show/ip-badge.js"></script> #}
{% endblock %}
\ No newline at end of file
......@@ -61,7 +61,7 @@
HTTP/2 302
location: https://peeringdb.com/api/net/291</code></pre>
<p class="mt-2 mb-0">Yes, we are aware of
<p class="mt-2 mb-0">We are aware of
<a class="text-monospace text-code"
href="https://peeringdb.com/api/net?asn=6939">https://peeringdb.com/api/net?asn=6939</a>,
but it returns less data for some reason.</p>
......@@ -82,4 +82,6 @@ location: https://peeringdb.com/api/net/291</code></pre>
<li>Europe: <code>https://api.telcodb.net/dns-query</code>
(<a href="https://api.telcodb.net/dns-query?name=www.google.com&amp;type=A">example</a>)</li>
</ul>
<p>See our DNS resolver's privacy policy <a href="https://lelux.fi/resolver/#privacy-policy">here</a>.</p>
{% endblock %}
\ No newline at end of file
......@@ -87,5 +87,5 @@
{# TODO: Fix whois backend to handle CIDR notations #}
<script src="/assets/js/pages/dns/show/whois.js" data-query="{{ cidrNotation }}"></script>
<script src="/assets/js/pages/dns/show/reverse-fetch.js" data-query="{{ cidrNotation }}"></script>
<script src="/assets/js/pages/dns/show/reverse-fetch.js" data-query="{{ cidrNotation }}" async defer></script>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment