Updated maxminddb dependency, added location info to lookup

This commit is contained in:
Slatian
2023-02-24 00:42:15 +01:00
parent da13444a2e
commit 4881f76b5b
5 changed files with 55 additions and 17 deletions

View File

@ -13,16 +13,16 @@
<section>
<h2>Network Information</h2>
<dl>
<dh>Type of Address</dh>
<dt>Type of Address</dt>
<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>
<dt>Hostname</dt>
<dd>{{ helper::dig(extra=extra, name=r.hostname) }}</dd>
{% endif %}
{% if r.asn %}
<dh><abbr="Autonomous System Number">ASN</abbr></dh>
<dt><abbr="Autonomous System Number">ASN</abbr></dt>
<dd>AS{{r.asn.asn}}</dd>
<dh>AS Name</dh>
<dt>AS Name</dt>
<dd>{{ r.asn.name }}</dd>
</dl>
{% endif %}
@ -47,13 +47,21 @@
{% endif %}
{{ helper::place_dl(place=r.location.city, label="City") }}
{% if r.location.postal_code %}
<dh>Postal Code</dh>
<dt>Postal Code</dt>
<dd>{{r.location.postal_code}}</dd>
{% endif %}
{% if r.location.time_zone %}
<dh>Timezone</dh>
<dt>Timezone</dt>
<dd>{{r.location.time_zone}}</dd>
{% endif %}
{% if r.location.accuracy %}
<dt>Accuaracy</dt>
<dd>~{{r.location.accuracy}}km</dd>
{% endif %}
{% if r.location.coordinates %}
<dt>Coordinates</dt>
<dd><a href="{{ links::map_link(lat=r.location.coordinates.lat, lon=r.location.coordinates.lon)}}">lat: {{r.location.coordinates.lat}}, lon: {{r.location.coordinates.lon}}</a></dd>
{% endif %}
</dl>
<!--We have to put that there to comply with maxminds licensing-->
<p><small>