Skip to content
Snippets Groups Projects
Commit ce1a2f59 authored by Jan Mach's avatar Jan Mach
Browse files

Fixed informant templates for certain undefined values.

parent 622a55e4
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@
<strong>{{ _('Total number of events:') }}</strong>
</td>
<td>
{{ format_decimal(stats_events['count']) }}
{{ format_decimal(stats_events.get('count', 0)) }}
</td>
</tr>
<tr>
......@@ -72,7 +72,7 @@
<strong>{{ _('Number of sent emails:') }}</strong>
</td>
<td>
{{ format_decimal(stats_reports['cnt_emails']) }}
{{ format_decimal(stats_reports.get('cnt_emails', 0)) }}
</td>
</tr>
<tr>
......@@ -80,7 +80,7 @@
<strong>{{ _('Number of reported events:') }}</strong>
</td>
<td>
{{ format_decimal(stats_reports['cnt_events']) }}
{{ format_decimal(stats_reports.get('cnt_events', 0)) }}
</td>
</tr>
<tr>
......
......@@ -29,10 +29,10 @@
{{ '{}'.format('*' * 90) }}
{{ '{:40s}'.format(_('Total number of events:')) }} {{ '{:>10s}'.format(format_decimal(stats_events['count'])) }}
{{ '{:40s}'.format(_('Total number of events:')) }} {{ '{:>10s}'.format(format_decimal(stats_events.get('count', 0))) }}
{{ '{:40s}'.format(_('Number of generated reports:')) }} {{ '{:>10s}'.format(format_decimal(stats_reports_cnt_all)) }} ({{ format_decimal(stats_reports_cnt) }} {{ _('summary') }}, {{ format_decimal(stats_reports_cnt_all - stats_reports_cnt) }} {{ _('extra') }})
{{ '{:40s}'.format(_('Number of sent emails:')) }} {{ '{:>10s}'.format(format_decimal(stats_reports['cnt_emails'])) }}
{{ '{:40s}'.format(_('Number of reported events:')) }} {{ '{:>10s}'.format(format_decimal(stats_reports['cnt_events'])) }}
{{ '{:40s}'.format(_('Number of sent emails:')) }} {{ '{:>10s}'.format(format_decimal(stats_reports.get('cnt_emails', 0))) }}
{{ '{:40s}'.format(_('Number of reported events:')) }} {{ '{:>10s}'.format(format_decimal(stats_reports.get('cnt_events', 0))) }}
{{ '{:40s}'.format(_('Summary for time period:')) }} {{ format_tzdatetime(dt_l) }} - {{ format_tzdatetime(dt_h) }} ({{ format_timedelta(dt_h - dt_l ) }})
{{ _('Contents') | upper }}
......
......@@ -20,4 +20,4 @@ open-source project.
__author__ = "Jan Mach <jan.mach@cesnet.cz>"
__credits__ = "Pavel Kácha <pavel.kacha@cesnet.cz>, Andrea Kropáčová <andrea.kropacova@cesnet.cz>"
__version__ = "2.7.6"
__version__ = "2.7.7"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment