mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 07:18:26 -04:00
Put uploaded files on the dashboard
This commit depends on and uses the data returned by: - [x] https://github.com/alphagov/notifications-api/pull/345 - [x] https://github.com/alphagov/notifications-api/pull/347 - [x] https://github.com/alphagov/notifications-admin/pull/612 It puts the last 5 jobs on the dashboard. This should be changed to all the jobs from the last 7 days when that parameter is available. It also: - links to the jobs page - makes the numbers on the jobs page consistent with the dashboard - makes the numbers on an individual job consistent with the appearance of the dashboard
This commit is contained in:
@@ -16,6 +16,7 @@ from flask_login import login_required
|
||||
|
||||
from app.main import main
|
||||
from app import (
|
||||
job_api_client,
|
||||
statistics_api_client,
|
||||
service_api_client,
|
||||
template_statistics_client
|
||||
@@ -217,4 +218,5 @@ def get_dashboard_statistics_for_service(service_id):
|
||||
'sms_allowance_remaining': max(0, (sms_free_allowance - sms_sent)),
|
||||
'sms_chargeable': max(0, sms_sent - sms_free_allowance),
|
||||
'sms_rate': sms_rate,
|
||||
'jobs': job_api_client.get_job(service_id, limit_days=7)['data']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user