mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 02:44:10 -04:00
Fix the link on the data-retention/edit.html
Adding new service_api_client methods to get data for the right amount of days.
This commit is contained in:
@@ -41,8 +41,14 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
"""
|
||||
return self.get('/service/{0}'.format(service_id))
|
||||
|
||||
def get_service_statistics(self, service_id, today_only):
|
||||
return self.get('/service/{0}/statistics'.format(service_id), params={'today_only': today_only})['data']
|
||||
# def get_service_statistics(self, service_id, today_only):
|
||||
# return self.get('/service/{0}/statistics'.format(service_id), params={'today_only': today_only})['data']
|
||||
|
||||
def get_service_statistics(self, service_id, limit_days=7):
|
||||
return self.get('/service/{0}/statistics'.format(service_id), params={'limit_days': limit_days})['data']
|
||||
|
||||
def get_service_statistics_for_today(self, service_id):
|
||||
return self.get('/service/{0}/statistics'.format(service_id), params={'today_only': True})['data']
|
||||
|
||||
def get_services(self, params_dict=None):
|
||||
"""
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{% call row() %}
|
||||
{{ text_field(item.notification_type | format_notification_type)}}
|
||||
{{ text_field(item.days_of_retention) }}
|
||||
{{ edit_field('Change', url_for('.link_service_to_organisation', service_id=current_service.id)) }}
|
||||
{{ edit_field('Change', url_for('.edit_data_retention', service_id=current_service.id, data_retention_id=item.id)) }}
|
||||
{% endcall %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user