mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
add detailed flag to GET service api client
returns current (past 7 days) notification stats as well as service info
This commit is contained in:
@@ -154,9 +154,7 @@ def get_dashboard_partials(service_id):
|
||||
return {
|
||||
'totals': render_template(
|
||||
'views/dashboard/_totals.html',
|
||||
statistics=add_rates_to(sum_of_statistics(
|
||||
statistics_api_client.get_statistics_for_service(service_id, limit_days=7)['data']
|
||||
))
|
||||
statistics=get_dashboard_totals(service_id)
|
||||
),
|
||||
'template-statistics': render_template(
|
||||
'views/dashboard/template-statistics.html',
|
||||
@@ -178,6 +176,12 @@ def get_dashboard_partials(service_id):
|
||||
}
|
||||
|
||||
|
||||
def get_dashboard_totals(service_id):
|
||||
return add_rates_to(sum_of_statistics(
|
||||
statistics_api_client.get_statistics_for_service(service_id, limit_days=7)['data']
|
||||
))
|
||||
|
||||
|
||||
def calculate_usage(usage):
|
||||
# TODO: Don't hardcode these - get em from the API
|
||||
sms_free_allowance = 250000
|
||||
|
||||
Reference in New Issue
Block a user