echoip-slatecave/templates/ip.html

75 lines
2.6 KiB
HTML
Raw Normal View History

2023-02-23 21:24:35 +01:00
{% extends "base.html" %}
2023-02-18 22:16:09 +01:00
{% import "helpers.html" as helper %}
{% import "links.html" as links %}
2023-02-23 21:24:35 +01:00
{% block title %}{{ data.result.address }}{% endblock %}
{% block og_title %}Lookup {{ data.result.address }}{% endblock %}
{% block h1 %}Lookup <code>{{ data.result.address }}</code>{% endblock %}
{% block og_path %}/ip/{{ data.result.address }}{% endblock %}
{% block content %}
2023-02-18 22:16:09 +01:00
{% set r = data.result %}
<section>
<h2>Network Information</h2>
<dl>
2023-02-23 21:24:35 +01:00
<dh>Type of Address</dh>
<dd>{{r.ip_info.scope | title}} {{r.ip_info.cast | title}} IPv{% if r.ip_info.is_v6_address %}6{% else %}4{% endif %}</dd>
2023-02-18 22:16:09 +01:00
{% if r.hostname %}
<dh>Hostname</dh>
2023-02-23 21:24:35 +01:00
<dd>{{ helper::dig(extra=extra, name=r.hostname) }}</dd>
2023-02-18 22:16:09 +01:00
{% endif %}
{% if r.asn %}
<dh><abbr="Autonomous System Number">ASN</abbr></dh>
<dd>AS{{r.asn.asn}}</dd>
<dh>AS Name</dh>
<dd>{{ r.asn.name }}</dd>
</dl>
{% endif %}
{% block other_ip_button %}{% endblock %}
2023-02-18 22:16:09 +01:00
</section>
{% if r.location %}
<section>
<h2>Geolocation</h2>
<dl>
{{ helper::place_dl(place=r.location.continent, label="Continent") }}
{{ helper::place_dl(place=r.location.country, label="Country") }}
{% if r.location.country.iso_code | default(value="") != r.location.registered_country.iso_code | default(value="") %}
2023-02-18 22:16:09 +01:00
{{ helper::place_dl(place=r.location.registered_country, label="Registred in") }}
{% endif %}
{% if r.location.country.iso_code | default(value="") != r.location.represented_country.iso_code | default(value="")%}
2023-02-18 22:16:09 +01:00
{{ helper::place_dl(place=r.location.represented_country, label="Represents") }}
{% endif %}
2023-02-18 22:16:09 +01:00
{% if r.location.subdivisions %}
{% for sd in r.location.subdivisions %}
{{ helper::place_dl(place=sd, label="Subdivision", iso_code_prefix=r.location.country.iso_code|default(value="")) }}
{% endfor %}
{% endif %}
{{ helper::place_dl(place=r.location.city, label="City") }}
{% if r.location.postal_code %}
<dh>Postal Code</dh>
<dd>{{r.location.postal_code}}</dd>
{% endif %}
{% if r.location.time_zone %}
<dh>Timezone</dh>
<dd>{{r.location.time_zone}}</dd>
{% endif %}
</dl>
<!--We have to put that there to comply with maxminds licensing-->
<p><small>
The GeopIP and ASN information is provided by the GeoLite2 database created by
<a target="_blank" href="https://www.maxmind.com">MaxMind</a>.
</small></p>
</section>
{% endif %}
2023-02-23 21:24:35 +01:00
{% block extra_content %}{% endblock %}
<section>
<h2>Other Services</h2>
{{ links::ip_address_links(address=r.address)}}
{% if r.asn %}
{{ links::asn_links(asn=r.asn.asn, org_name=r.asn.name) }}
{% endif %}
</section>
2023-02-23 21:24:35 +01:00
{% endblock %}
2023-02-18 22:16:09 +01:00