{% extends "_layout.html" %} {% block content %}
{{ macros_page.render_breadcrumbs() }}

{{ hawat_current_view.get_view_title() }}


{{ macros_form.render_form_item_default(g.search_form.source_addrs) }}
{{ macros_form.render_form_item_datetime(g.search_form.dt_from, 'datetimepicker-from') }}
{{ macros_form.render_form_item_datetime(g.search_form.dt_to, 'datetimepicker-to') }}

{{ _('This module displays various statistics of IDEA events calculated for given network and optional time interval and with emphasis on said event timelines. These statistics are calculated directly from IDEA event database, so depending on the size of the selected network, the interval and number of related IDEA events these visualisations may take some time, even on the order of minutes. Please, be patient. Events are included into the result based on their detection time.') | safe }}

{%- if searched %} {%- if permission_can('power') %} {%- call macros_site.render_alert('info', False, 'role-admin') %} {{ gettext('SQL query:') }} {{ sqlquery }} {%- endcall %} {%- endif %} {%- if 'tiid' in request.args %} {{ macros_site.render_timepager(query_params, form_data.dt_from, request.args.tiid) }} {%- endif %} {%- if items_count %}

{{ gettext('Result summary') }}

{%- if permission_can('admin') and 'timeline_cfg' in statistics %} {%- endif %}
{{ gettext('Number of events') }}: {{ babel_format_decimal(items_count) }}
{{ gettext('Time interval') }}: {{ babel_format_datetime(statistics['timeline_cfg']['dt_from']) }} - {{ babel_format_datetime(statistics['timeline_cfg']['dt_to']) }}
{{ gettext('Time interval delta') }}: {{ babel_format_timedelta(statistics['timeline_cfg']['dt_to'] - statistics['timeline_cfg']['dt_from']) }}
{{ get_icon('role-admin') }}{{ gettext('Timeline steps') }}: {{ babel_format_decimal(statistics['timeline_cfg']['count']) }} x {{ statistics['timeline_cfg']['step'].__str__() }}

{{ _('Total event counts') }}

{{ _('This view shows total numbers of IDEA events related to given network.') | safe }}

{%- set data_series = [ ['cnt_events', _('total events')] ] %} {{ macros_chart.render_chart_timeline_list( statistics, 'search_result_statistics', 'totals', data_series ) }}
{{ macros_chart.render_dataset_pie_list( statistics, 'search_result_statistics', 'totals', data_series ) }}

{{ _('Event recurrence') }}

{{ _('This view shows the IDEA event recurrence. The recurring events are those with repeating combination of event source and classification within the dataset.') | safe }}

{%- set data_series = [ ['cnt_recurring', _('recurring')], ['cnt_unique', _('unique')] ] %} {{ macros_chart.render_chart_timeline_list( statistics, 'search_result_statistics', 'recurrence', data_series ) }}
{{ macros_chart.render_dataset_pie_list( statistics, 'search_result_statistics', 'recurrence', data_series ) }}
{{ macros_chart.render_dashboard_panels( statistics, 'search_result_statistics', 'stats' ) }}
{%- if permission_can('developer') %}
{{ 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 %} {%- if permission_can('developer') %}
{{ macros_site.render_raw_var('request_args', request.args) }} {{ macros_site.render_raw_var('form_data', form_data) }} {{ macros_site.render_raw_var('query_params', query_params) }} {%- endif %} {%- endblock content %}