Commit Graph

12 Commits

Author SHA1 Message Date
Martyn Inglis
3006c7af54 Removed print 2016-08-24 10:59:33 +01:00
Martyn Inglis
4e6da1ba55 Changed template stats for template id
- now returns the most recent notification history row for that template ID.
- contains all the required data for the use cases for that template
2016-08-22 14:35:04 +01:00
Martyn Inglis
b7476a1975 Removed the group by day aspects of template stats. Not needed. Grouped by template only. 2016-08-22 10:38:44 +01:00
Martyn Inglis
ede7d0cbea Removed old endpoint.
Going to handle the migration in the clients.
2016-08-18 14:06:12 +01:00
Martyn Inglis
7a5acea71b New endpoint for template stats to use new query. Breaking change to the returned JSON, so adding on a different url. 2016-08-18 14:01:31 +01:00
Leo Hemsted
3e72440f38 fix template api tests being inconsistent by adding ordering 2016-06-09 11:24:04 +01:00
Leo Hemsted
e3d9dfad6e add template_statistics endpoint for specific template
`/service/<service_id>/template-statistics/<template_id>`
still requires service-id just to try and keep api tree cleaner
2016-06-07 14:18:42 +01:00
Rebecca Law
b53fdf1f3f Update python client to version 1.0.0.
This version of the client removed the request method, path and body from the encode and decode methods.
The biggest changes here is to the unit tests.
2016-05-04 16:08:23 +01:00
Chris Hill-Scott
d7f6bb9976 Align date range for template + notification stats
We were using two different queries to filter template stats to the past
7 days, plus today.

Since we’re storing both as short dates, we can now use the same query
for both.

0      | 1       | 2         | 3        | 4      | 5        | 6      | 7
-------|---------|-----------|----------|--------|----------|--------|-------
Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday | Monday

So if we are on Monday, the stats should include today, plus everything
back to last Monday.

Previously the template stats query was only going back to the Tuesday.

This should mean the numbers on the dashboard always line up.
2016-04-27 11:11:09 +01:00
Adam Shimali
4ed2e7f8f2 Fix for misunderstanding about date range required for templates
stats.

It should always be last n days, whether or not there is data.
2016-04-07 09:30:02 +01:00
Adam Shimali
e4a5e3890a Corrected error message format 2016-04-04 14:51:56 +01:00
Adam Shimali
0d06be05e1 [WIP] Added dao method and rest endpoint for getting template
statistics by service.

Some cosmetic changes to imports.

Added fix for job rest not correctly returning errors.
2016-04-04 14:38:54 +01:00