Adding views to view, add and edit service data retention policies.

Only visible to a platform admin.
A service can have a custom number of days to retain the notification data for each notification type.
This commit is contained in:
Rebecca Law
2018-07-17 14:39:04 +01:00
parent 13d05c5461
commit 4b8b571a87
12 changed files with 193 additions and 35 deletions

View File

@@ -0,0 +1,44 @@
{% extends "withnav_template.html" %}
{% from "components/api-key.html" import api_key %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/table.html" import row_group, row, text_field, edit_field, field, boolean_field, list_table with context %}
{% block service_page_title %}
Email reply to addresses
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row bottom-gutter">
<div class="column-two-thirds">
<h1 class="heading-large">
Data retention
</h1>
</div>
<div class="column-one-third">
<a href="{{ url_for('.add_data_retention', service_id=current_service.id) }}" class="button align-with-heading">Add data retention</a>
</div>
</div>
<div class="grid-row bottom-gutter">
<div class="column-full">
By default data is kept for 7 days
</div>
</div>
<div class="user-list">
{% if not data_retention_settings %}
<div class="user-list-item">
<span class="hint">You havent added any data retention</span>
</div>
{% endif %}
{% for item in data_retention_settings %}
<div class="user-list-item">
<p>
{{ item.notification_type | format_notification_type }} notifications will be kept for {{ item.days_of_retention }} days
<a class="user-list-edit-link" href="{{ url_for('.edit_data_retention', service_id =current_service.id, data_retention_id = item.id) }}">Change</a>
</p>
</div>
{% endfor %}
</div>
{% endblock %}