Template improments, links, breadcrumbs for domain lookups

This commit is contained in:
Slatian
2023-02-24 00:01:51 +01:00
parent 6e1d3c02ef
commit da13444a2e
10 changed files with 112 additions and 8 deletions

View File

@ -1,5 +1,6 @@
{% extends "base.html" %}
{% import "helpers.html" as helper %}
{% import "links.html" as links %}
{% block title %}{{ data.result.address }}{% endblock %}
{% block og_title %}Lookup {{ data.result.address }}{% endblock %}
@ -13,7 +14,7 @@
<h2>Network Information</h2>
<dl>
<dh>Type of Address</dh>
<dd>{{r.ip_info.scope}} {{r.ip_info.cast}} IPv{% if r.ip_info.is_v6_address %}6{% else %}4{% endif %}</dd>
<dd>{{r.ip_info.scope | title}} {{r.ip_info.cast | title}} IPv{% if r.ip_info.is_v6_address %}6{% else %}4{% endif %}</dd>
{% if r.hostname %}
<dh>Hostname</dh>
<dd>{{ helper::dig(extra=extra, name=r.hostname) }}</dd>
@ -25,6 +26,7 @@
<dd>{{ r.asn.name }}</dd>
</dl>
{% endif %}
{% block other_ip_button %}{% endblock %}
</section>
{% if r.location %}
<section>
@ -32,8 +34,12 @@
<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="") %}
{{ 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="")%}
{{ helper::place_dl(place=r.location.represented_country, label="Represents") }}
{% endif %}
{% 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="")) }}
@ -57,5 +63,12 @@
</section>
{% endif %}
{% 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>
{% endblock %}