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

{{ hawat_view_title }}

{{ search_form.search.label(class_='sr-only') }}
{{ get_fa_icon('search') }}
{{ search_form.search(class_='form-control',placeholder='IP address, range, network',size='60') }}
{{ search_form.submit(class_='btn btn-primary') }}
{{ macros_site.form_errors(search_form.search.errors) }}
{%- if search_result %}
{%- if search_result['asn'] %}

{{ gettext('ASN lookup') }}

{%- if 'ans' in search_result['asn'] %} {%- endif %} {%- if 'org' in search_result['asn'] %} {%- endif %}
{{ gettext('ANS number:') }} {{ search_result['asn']['asn'] }}
{{ gettext('Organization:') }} {{ search_result['asn']['org'] }}
{%- endif %} {%- if search_result['city'] %}

{{ gettext('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 %}
{{ gettext('Continent:') }} {{ search_result['city']['cnt_name'] }} ({{ search_result['city']['cnt_code'] | upper }})
{{ gettext('Country:') }} {{ search_result['city']['ctr_name'] }} ({{ search_result['city']['ctr_code'] | upper }}, )
{{ gettext('City:') }} {{ search_result['city']['cty_name'] }}
{{ gettext('Timezone:') }} {{ search_result['city']['timezone'] }}
{{ gettext('Coordinates:') }} @{{ search_result['city']['latitude'] }},{{ search_result['city']['longitude'] }}
{%- endif %} {%- if permission_can('developer') %}

{{ gettext('Raw result') }}

{{ search_result | pprint }}
{%- endif %}
{%- endif %} {%- endblock content %}