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

{{ hawat_current_view.get_view_title() }}


{{ macros_form.render_form_item_select(g.search_form.groups) }}
{{ 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 statistical information regarding the reporting component of the Mentat system. These statistics are calculated directly from all summary reports, that were generated. The extra reports reports are included only in total number of reports overview, because otherwise they contain data duplicit to those in summary reports. Reports are included into the result based on their creation time.') | safe }}

{%- if searched %} {%- if 'tiid' in request.args %} {{ macros_site.render_timepager(query_params, form_data.dt_from, request.args.tiid) }} {%- endif %} {%- if items %}

{{ _('Result summary') }}

{%- if 'timeline_cfg' in statistics %} {%- endif %} {%- if permission_can('admin') and 'timeline_cfg' in statistics %} {%- endif %}
{{ _('Number of reports') }}: {{ babel_format_decimal(items_count) }}
{{ _('Number of emails') }}: {{ babel_format_decimal(statistics['cnt_emails']) }}
{{ _('Number of reported events') }}: {{ babel_format_decimal(statistics['cnt_events']) }}
{{ _('Result time interval') }}: {{ babel_format_datetime(statistics['dt_from']) }} - {{ babel_format_datetime(statistics['dt_to']) }} ({{ babel_format_timedelta(statistics['dt_to'] - statistics['dt_from']) }})
{{ _('Timeline time interval') }}: {{ babel_format_datetime(statistics['timeline_cfg']['dt_from']) }} - {{ babel_format_datetime(statistics['timeline_cfg']['dt_to']) }} ({{ babel_format_timedelta(statistics['timeline_cfg']['dt_to'] - statistics['timeline_cfg']['dt_from']) }})
{{ get_icon('role-admin') }}{{ _('Timeline steps') }}: {{ babel_format_decimal(statistics['timeline_cfg']['count']) }} x {{ statistics['timeline_cfg']['step'].__str__() }}

{{ _('Report counts') }}

{{ _('This view shows total numbers of event reports generated by the Mentat system per day. Numbers of summary and extra reports are shown separatelly.') | safe }}

{%- set data_series = [ ['cnt_reports_summary', _('summaries')], ['cnt_reports_extra', _('extras')] ] %} {{ macros_chart.render_chart_timeline_list( statistics, 'search_result_statistics', 'reporting_stats', data_series ) }}
{{ macros_chart.render_dataset_pie_list( statistics, 'search_result_statistics', 'reporting_stats', data_series ) }}

{{ _('Email counts') }}

{{ _('This view shows total numbers of report emails generated by the Mentat system per day.') | safe }}

{%- if 'emails' in statistics %} {%- if 'timeline' in statistics %} {{ macros_chart.render_chart_timeline_dict( statistics, 'search_result_statistics', 'mailing_stats', 'emails' ) }}
{%- endif %} {{ macros_chart.render_dataset_pie_dict( statistics, 'search_result_statistics', 'mailing_stats', 'emails' ) }} {%- else %} {%- call macros_site.render_alert('warning', False) %} {{ _('No data to be displayed on this panel.') }} {%- endcall %} {%- endif %}

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

{{ _('This view shows total numbers of events that have been reported within the summary event reports. Numbers of new and relapsing events are shown separatelly. New events are those with unique combination of source and classification, relapsing events are those with repeating combination of source and classification.') }}

{%- set data_series = [ ['cnt_events_new', _('new')], ['cnt_events_relapsed', _('relapsed')] ] %} {{ macros_chart.render_chart_timeline_list( statistics, 'search_result_statistics', 'event_stats', data_series ) }}
{{ macros_chart.render_dataset_pie_list( statistics, 'search_result_statistics', 'event_stats', data_series ) }}

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

{{ _('This view shows total numbers of events that have been processed while generating event reports. Numbers of reported, filtered and thresholded events are shown separatelly. The reported events are those that have been actually reported within the summary reports. The filtered events are those that have been filtered out by configured reporting filters and never made it to the report. And finally the thresholded events are those that have been postponed from reporting by the event thresholding mechanism.') }}

{%- set data_series = [ ['cnt_events', _('reported')], ['cnt_events_filtered', _('filtered')], ['cnt_events_thresholded', _('thresholded')] ] %} {{ macros_chart.render_chart_timeline_list( statistics, 'search_result_statistics', 'processing_stats', data_series ) }}
{{ macros_chart.render_dataset_pie_list( statistics, 'search_result_statistics', 'processing_stats', data_series ) }}
{{ macros_chart.render_dashboard_panels( statistics, 'search_result_statistics', 'reporting-stats' ) }}
{%- if permission_can('developer') %}
{{ macros_site.render_raw_var('statistics', statistics) }} {%- endif %} {%- else %} {%- call macros_site.render_alert('warning', False) %} {{ _('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 %}