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

{{ hawat_view_title }}


{{ macros_site.render_form_item_datetime(search_form.dt_from, 'datetimepicker-hm-from', False) }} {{ macros_site.render_form_item_datetime(search_form.dt_to, 'datetimepicker-hm-to', False) }} {{ search_form.submit(class_='btn btn-primary') }} {{ gettext('Clear') }}
{%- if search_form.dt_from.errors %}
{{ macros_site.form_errors(search_form.dt_from.errors) }}
{%- endif %} {%- if search_form.dt_to.errors %}
{{ macros_site.form_errors(search_form.dt_to.errors) }}
{%- endif %}
{%- if searched %} {%- if items %}

{{ gettext('Result summary') }}

{{ gettext('Number of statistical records') }}: {{ babel_format_decimal(items_count) }}
{{ gettext('Number of events') }}: {{ babel_format_decimal(statistics['count']) }}
{{ gettext('Time interval') }}: {{ babel_format_datetime(statistics['dt_from']) }} - {{ babel_format_datetime(statistics['dt_to']) }}
{{ gettext('Time interval delta') }}: {{ babel_format_timedelta(statistics['dt_to'] - statistics['dt_from']) }}
{%- for chsection in ('abuses', 'analyzers', 'asns', 'categories', 'category_sets', 'countries', 'detectors', 'detectorsws', 'ips') %}
{{ macros_site.render_chart_pie( 'stats_overall', statistics['stats_overall'], chsection, 'Number of events per ' + chsection, ) }}
{%- endfor %}
{%- for chsection in ('abuses', 'analyzers', 'asns', 'categories', 'category_sets', 'countries', 'detectors', 'detectorsws', 'ips') %}
{{ macros_site.render_chart_pie( 'stats_internal', statistics['stats_internal'], chsection, 'Number of events per ' + chsection, ) }}
{%- endfor %}
{%- for chsection in ('abuses', 'analyzers', 'asns', 'categories', 'category_sets', 'countries', 'detectors', 'detectorsws', 'ips') %}
{{ macros_site.render_chart_pie( 'stats_external', statistics['stats_external'], chsection, 'Number of events per ' + chsection, ) }}
{%- endfor %}
{%- if permission_can('developer') %}
{{ macros_site.render_raw_var('items', items) }} {{ macros_site.render_raw_var('statistics', statistics) }} {%- endif %} {%- else %} {%- call macros_site.render_alert('warning', False) %} {{ gettext('No data matches your search criteria.') }} {%- endcall %} {%- endif %} {%- endif %} {%- endblock content %} {%- block css %} {{ super() }} {%- endblock css %} {%- block headjs %} {{ super() }} {%- endblock headjs %} {%- block js %} {{ super() }} {%- endblock js %}