mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Show template usage for all time on it’s own page
> We show the last weeks template usage on the dashboard, which is > great, but if you're looking for longer term trends, you're out of > luck... > So, let's let you see more on a more detailed page (linked from the > dashboard). Initially this should just show you all templates that you > have used ever and the count for each. Order same as dashboard, most > popular first. https://www.pivotaltracker.com/story/show/117614585
This commit is contained in:
@@ -54,6 +54,18 @@ def service_dashboard_updates(service_id):
|
||||
})
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/template-activity")
|
||||
@login_required
|
||||
@user_has_permissions('view_activity', admin_override=True)
|
||||
def template_history(service_id):
|
||||
return render_template(
|
||||
'views/dashboard/all-template-statistics.html',
|
||||
template_statistics=aggregate_usage(
|
||||
template_statistics_client.get_template_statistics_for_service(service_id)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def add_rates_to(delivery_statistics):
|
||||
|
||||
if not delivery_statistics or not delivery_statistics[0]:
|
||||
@@ -125,4 +137,4 @@ def get_dashboard_statistics_for_service(service_id):
|
||||
'template_statistics': aggregate_usage(
|
||||
template_statistics_client.get_template_statistics_for_service(service_id, limit_days=7)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user