Fixed text templates

This commit is contained in:
Slatian
2023-02-25 18:32:09 +01:00
parent 574fe77717
commit e50bd14fcf
3 changed files with 47 additions and 23 deletions

View File

@ -19,40 +19,40 @@
* AS Name: {{r.asn.name}}
{%- endif -%}
{%- if r.location -%}
{%- if r.location %}
## Geolocation
{{ 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 -%}
{{ 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="")) }}
{{- 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 -%}
{{- helper::place_dl(place=r.location.city, label="City") -}}
{%- if r.location.postal_code -%}
* Postal Code: {{r.location.postal_code}}
{%- endif %}
{% if r.location.time_zone -%}
{% endif %}
{%- if r.location.time_zone -%}
* Timezone: {{r.location.time_zone}}
{% endif -%}
{% if r.location.accuracy -%}
* Accuaracy: ~{{r.location.accuracy}}km<
{%- endif %}
{% if r.location.coordinates %}
{%- if r.location.accuracy -%}
* Accuaracy: ~{{r.location.accuracy}}km
{% endif %}
{%- if r.location.coordinates %}
### Coordinates
lat: {{r.location.coordinates.lat}}, lon: {{r.location.coordinates.lon}}
=> {{ links::map_link(lat=r.location.coordinates.lat, lon=r.location.coordinates.lon)}}
{% endif %}
{%- endif %}
The GeopIP and ASN information is provided by the GeoLite2 database created by MaxMind.
{% endif -%}
{%- block extra_content %}{% endblock -%}