Skip to content
Snippets Groups Projects
Commit ddadd84c authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Merge branch 'hruska-feature-6255-move-attachments' into devel

parents 085dfbab 2ab0fad8
No related branches found
No related tags found
No related merge requests found
......@@ -113,13 +113,6 @@
{{ _('This report contains fraction of data from parent summary report [{:s}], that is also available in HTML format at:').format(report.parent.label) | wordwrap(width=text_width, break_long_words=False) }}
{{ additional_vars['report_access_url'] }}{{ report.parent.label }}/unauth
{% if settings.attachments == 'none' %}
{{ _('Appending attachments to email report is disabled in the reporting settings for your contact address. Please download complete information available for each event from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- elif not attachment_files %}
{{ _('Attachment files containing complete information available for each event exceeded maximal allowed size, please download them from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- else %}
{{ _('Complete information available for each event can also be found in the attached machine-processable files (we recommend JSON, which bears full data).') | wordwrap(width=text_width, break_long_words=False) }}
{%- endif %}
{{ _('This message was generated by an automated system. For further communication please use the contact email address <{:s}> and for easier orientation please keep the identifier [{:s}] in email subject.').format(additional_vars['contact_email'], report.label) | wordwrap(width=text_width, break_long_words=False) }}
......
......@@ -108,13 +108,6 @@
{{ macros_common.render_info_severity(report, text_width) }}
{{ _('Links to interactive web version of this report and complete data are located in the footer.') | wordwrap(width=text_width, break_long_words=False) }}
{% if settings.attachments == 'none' %}
{{ _('Appending attachments to email report is disabled in the reporting settings for your contact address. Please download complete information available for each event from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- elif not attachment_files %}
{{ _('Attachment files containing complete information available for each event exceeded maximal allowed size, please download them from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- else %}
{{ _('Complete information available for each event can also be found in the attached machine-processable files (we recommend JSON, which bears full data).') | wordwrap(width=text_width, break_long_words=False) }}
{%- endif %}
{{ _('This message was generated by an automated system. For further communication please use the contact email address <{:s}> and for easier orientation please keep the identifier [{:s}] in email subject.').format(additional_vars['contact_email'], report.label) | wordwrap(width=text_width, break_long_words=False) }}
......
......@@ -29,8 +29,6 @@
{{ macros_form.render_form_item_select(form.mode) }}
{{ macros_form.render_form_item_select(form.attachments) }}
{{ macros_form.render_form_item_default(form.emails) }}
{{ macros_form.render_form_item_default(form.template) }}
......@@ -39,14 +37,10 @@
{{ macros_form.render_form_item_select(form.timezone) }}
{{ macros_form.render_form_item_select(form.max_attachment_size) }}
{{ macros_form.render_form_item_radiobutton(form.mute) }}
{{ macros_form.render_form_item_radiobutton(form.redirect) }}
{{ macros_form.render_form_item_radiobutton(form.compress) }}
<hr>
{{ macros_form.render_form_item_radiobutton(form.timing) }}
......
......@@ -86,44 +86,6 @@
{{ system_default_repsettings.mode }}
</td>
</tr>
<tr>
<th>
{{ _('Report attachments') }}:
</th>
<td>
{%- if item.attachments is not none %}
{{ item.attachments }}
{%- else %}
{{ _('<< system default >>') }}
{%- endif %}
</td>
<td>
{{ system_default_repsettings.attachments }}
</td>
</tr>
<tr>
<th>
{{ _('Attachment size limit') }}:
</th>
<td>
{%- if item.max_attachment_size is not none %}
{%- if item.max_attachment_size %}
{{ babel_format_bytes(item.max_attachment_size) }}
{%- else %}
{{ _('<< no limit >>') }}
{%- endif %}
{%- else %}
{{ _('<< system default >>') }}
{%- endif %}
</td>
<td>
{%- if system_default_repsettings.max_size %}
{{ babel_format_bytes(system_default_repsettings.max_size) }}
{%- else %}
{{ _('<< no limit >>') }}
{%- endif %}
</td>
</tr>
<tr>
<th>
{{ _('Report template') }}:
......@@ -199,21 +161,6 @@
{{ macros_site.render_label_item_state(system_default_repsettings.redirect, True) }}
</td>
</tr>
<tr>
<th>
{{ _('Attachment compression') }}:
</th>
<td>
{%- if item.compress is not none %}
{{ macros_site.render_label_item_state(item.compress, True) }}
{%- else %}
{{ _('<< system default >>') }}
{%- endif %}
</td>
<td>
{{ macros_site.render_label_item_state(system_default_repsettings.compress, True) }}
</td>
</tr>
<tr>
<th>
{{ _('Reporting timing') }}:
......
......@@ -360,11 +360,12 @@ class EventReporter(BaseReporter):
'security-report-{}.csv'.format(report.label)
)
# Compose list of requested attachment files.
attachment_files = self.choose_attachments(
'security-report-{}'.format(report.label),
settings
)
# Attachments were moved from emails to web (Redmine issue #6255).
attachment_files = []
#attachment_files = self.choose_attachments(
# 'security-report-{}'.format(report.label),
# settings
#)
report.structured_data = self.prepare_structured_data(events.get('regular_aggr', {}), events.get('relapsed_aggr', {}), settings)
......@@ -441,11 +442,12 @@ class EventReporter(BaseReporter):
'security-report-{}.csv'.format(report.label)
)
# Compose list of requested attachment files.
attachment_files = self.choose_attachments(
'security-report-{}'.format(report.label),
settings
)
# Attachments were moved from emails to web (Redmine issue #6255).
attachment_files = []
#attachment_files = self.choose_attachments(
# 'security-report-{}'.format(report.label),
# settings
#)
report.structured_data = self.prepare_structured_data({src: events_regular_aggr}, {src: events_relapsed_aggr}, settings)
......
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