On the team and templates pages we have a pattern for adding a new
‘thing’, which is a green button in the top right.
This commit changes the API key page to follow the same pattern.
> 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
Previous the table of templates on the dashboard was for all time.
This commit uses the `limit_days` parameter of the API endpoint to only
show template usage from the last 7 days, aligning with the big numbers
shown above.
We want to align all our stats to be for the last 7 days.
This means summing up the stats response from the API to make the Big
Number. Previously the big number was counting sent notifications as
successful. This commit changes it to only look at delivered
notifications.
Right now, the API doesn’t have a way of filtering to only show the last
7 days. So for the moment the dashboard will show statistics for all
time.
The upshot of this is that we can link from the dashboard to the
activity page when there are failures.
For users who:
- want to send messages from a template
- want to edit templates
For developers:
- who need to get the ID of a template
This commit mainly cleans up the choose template page so there are less
options, and the options that are there are less wordy.
This means:
- moving ‘send yourself a test’ onto the send messages page, and making
it button
- stripping a lot of stuff out of the ‘send from API’ page, so it’s more
obvious what the template ID is
When you add a new service, it’s probably the one you want to do stuff
with.
When you get invited, the service you’ve been invited to is probably the
one you want to use.
This commit adds the ID of the new service or service you’ve been
invited to to the session.
There’s no content in the tour that’s specific to a service. And since
we can now take a pretty good guess at what service you last used, or
which service we should send you to if you only have one service,
there’s no need to make the URLs for the tour service-specific.
This also means that you don’t need to be logged in to see the tour
pages, and we have no good reason to only restrict these pages to users
with accounts.
https://www.pivotaltracker.com/story/show/116960703
Template stats should show the most-used template first.
This commit:
- re-writes the `aggregate_usage` function to use `itertools.groupby`,
which can do aggregation, and can return data in a structure that’s
easy to sort on
- uses generators so that we’re not keeping lots of rows of template
stats in memory
https://www.pivotaltracker.com/story/show/117348893
We probably shouldn’t hide the contents of the CSV when people are just
testing the app, or if they’re starting off with small jobs.
A limit of 15 rows displayed was awkwardly on the cusp between just
testing and sending a small batch.
This commit increases the limit to 50; I reckon that over 50 recipients
no-one will be wanting to check them all individually.
> If a user tries to save a template containing something like
> ((name,date)) we should give a validation error.
This is because it causes havoc with the column headers in CSV files.
https://www.pivotaltracker.com/story/show/117043389
Right now the crown logo in email templates is hosted on Github. Github
is not a CDN.
For now, hosting it in the app is a better solution. At some point we
should have a CDN for all assets on the app, which would be even better.
https://www.pivotaltracker.com/story/show/116952911
The problem
---
1. Upload a CSV with problems
2. See the validation errors on the page
3. Try to re-upload the file
4. Get this error:
> Method Not Allowed
> The method is not allowed for the requested URL.
https://www.pivotaltracker.com/story/show/116882241
The cause
---
The POST route for the check page (where you see errors in your files)
was removed here:
f3fd5f6b15 (diff-1dd8b3bf53dfd9382c7721051f3d930dR280)
The fix
---
This commit adds:
- a simple route which re-calls the initial ‘I have uploaded a file’ route
- a test to make sure that both of these routes are POSTed to