mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
When someone complains about an email from the platform we get a callback from SES.
A new platform admin page Email complaints has been added to surface those complaints. Eventually the complaints will be visible to the services so they can remove the email address from their mailing list. Next thing to implement is "x email complaints" warning on the platform admin summary page.
This commit is contained in:
@@ -4,7 +4,7 @@ from datetime import datetime
|
||||
from flask import render_template, request
|
||||
from flask_login import login_required
|
||||
|
||||
from app import service_api_client
|
||||
from app import complaint_api_client, service_api_client
|
||||
from app.main import main
|
||||
from app.main.forms import DateFilterForm
|
||||
from app.statistics_utils import get_formatted_percentage
|
||||
@@ -70,6 +70,18 @@ def platform_admin_services():
|
||||
)
|
||||
|
||||
|
||||
@main.route("/platform-admin/complaints")
|
||||
@login_required
|
||||
@user_is_platform_admin
|
||||
def platform_admin_list_complaints():
|
||||
complaints = complaint_api_client.get_all_complaints()
|
||||
return render_template(
|
||||
'views/platform-admin/complaints.html',
|
||||
complaints=complaints,
|
||||
page_title='All Complaints',
|
||||
)
|
||||
|
||||
|
||||
def sum_service_usage(service):
|
||||
total = 0
|
||||
for notification_type in service['statistics'].keys():
|
||||
|
||||
Reference in New Issue
Block a user