{%- extends "_layout.html" %} {%- block content %}

{{ hawat_current_view.get_view_title() }}

{{ search_form.search.label(class_='sr-only') }}
{{ get_icon('action-search') }}
{{ search_form.search(class_='form-control', placeholder=_('IPv4 or IPv6 address'), size='50') }}
{{ search_form.submit(class_='btn btn-primary') }} {{ _('Clear') }}
{{ macros_form.render_form_errors(search_form.search.errors) }}
{%- if search_item %}
{%- if search_result['asn'] %}

{{ _('ASN lookup') }}

{%- if 'asn' in search_result['asn'] %} {%- endif %} {%- if 'org' in search_result['asn'] %} {%- endif %}
{{ _('ASN number:') }} {{ search_result['asn']['asn'] }}
{{ _('Organization:') }} {{ search_result['asn']['org'] }}
{%- else %} {%- call macros_site.render_alert('info', False) %} {{ _('There are no records for %(item_id)s in ASN database.', item_id = search_item) | safe }} {%- endcall %} {%- endif %} {%- if search_result['city'] %}

{{ _('City lookup') }}

{%- if 'cnt_name' in search_result['city'] and search_result['city']['cnt_name'] %} {%- endif %} {%- if 'ctr_name' in search_result['city'] and search_result['city']['ctr_name'] %} {%- endif %} {%- if 'cty_name' in search_result['city'] and search_result['city']['cty_name'] %} {%- endif %} {%- if 'timezone' in search_result['city'] %} {%- endif %} {%- if 'latitude' in search_result['city'] and 'longitude' in search_result['city'] %} {%- endif %}
{{ _('Continent:') }} {{ search_result['city']['cnt_name'] }} ({{ search_result['city']['cnt_code'] | upper }})
{{ _('Country:') }} {{ search_result['city']['ctr_name'] }} ({{ search_result['city']['ctr_code'] | upper }}, {{ get_country_flag(search_result['city']['ctr_code']) }})
{{ _('City:') }} {{ search_result['city']['cty_name'] }}
{{ _('Timezone:') }} {{ search_result['city']['timezone'] }}
{{ _('Coordinates:') }} @{{ search_result['city']['latitude'] }},{{ search_result['city']['longitude'] }}

{{ _('Search powered by GeoLite2 created by MaxMind.') | safe }}

{%- else %} {%- call macros_site.render_alert('info', False) %} {{ _('There are no records for %(item_id)s in City database.', item_id = search_item) | safe }} {%- endcall %} {%- endif %}
{%- if permission_can('developer') %}
{{ macros_site.render_raw_var('form_data', form_data) }} {{ macros_site.render_raw_var('search_result', search_result) }} {{ macros_site.render_raw_var('request_args', request_args) }} {{ macros_site.render_raw_var('query_params', query_params) }} {%- endif %} {%- endif %} {%- endblock content %}