Commit Graph

462 Commits

Author SHA1 Message Date
Chris Hill-Scott
b5ed12421a Merge pull request #497 from alphagov/api-keys-page-improvements
API keys page improvements
2016-04-25 11:39:49 +01:00
Chris Hill-Scott
96cc03dc9e Merge pull request #490 from alphagov/contact-link-signup
Updated the contact us link for non gov.uk domains trying to register.
2016-04-25 11:38:30 +01:00
Chris Hill-Scott
d0c4509761 Fix missing request context in validators tests 2016-04-25 11:20:43 +01:00
Chris Hill-Scott
71035ab96e Use the same pattern as elsewhere for ‘new thing’
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.
2016-04-25 10:52:07 +01:00
Rebecca Law
9ae6e18ad2 Fix unit tests, change agent_team_id to department_id 2016-04-22 16:28:33 +01:00
Rebecca Law
49db4e85ad Merge pull request #482 from alphagov/update-requirements
Update requirements
2016-04-21 10:28:45 +01:00
Rebecca Law
2afbbd6423 Removed unused requirements and modules. 2016-04-21 09:11:00 +01:00
Chris Hill-Scott
0080bce562 Say ‘sent’ rather than ‘processed’
Hopefully users understand that sent != delivered
2016-04-20 15:32:02 +01:00
Chris Hill-Scott
09491e880e Show template usage for all time on it’s own page
> 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
2016-04-20 15:31:42 +01:00
Chris Hill-Scott
312a903e65 Limit templates usage on dashboard to last 7 days
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.
2016-04-20 15:02:29 +01:00
NIcholas Staples
4f71c40735 Merge pull request #466 from alphagov/desktop_feedback
Feedback page added. All tests working.
2016-04-20 11:17:55 +01:00
Chris Hill-Scott
8d6eb0985b Merge pull request #471 from alphagov/craig-david
Show the last 7 days of statistics on the dashboard
2016-04-20 11:13:51 +01:00
Nicholas Staples
da536bbd2e Feedback page working with all tests passing.
Updated to include team id.

Give Feedback -> Give feedback
2016-04-20 10:17:09 +01:00
Chris Hill-Scott
be7c7cebbc Limit big numbers to the last 7 days
Implements and depends on:
- https://github.com/alphagov/notifications-api/pull/241
2016-04-19 17:10:39 +01:00
Chris Hill-Scott
5bf0d8fe70 Show all statistics fetched on the dashboard
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.
2016-04-19 15:57:53 +01:00
Chris Hill-Scott
9b75f7ef8a Merge pull request #467 from alphagov/tour-footer-link
Put a link to the tour in the footer
2016-04-19 15:55:47 +01:00
Chris Hill-Scott
352750dcf6 Merge pull request #470 from alphagov/better-better-send-page
Make the flow of using templates better
2016-04-19 15:54:47 +01:00
Chris Hill-Scott
27ad1532e4 Make the flow of using templates better
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
2016-04-19 15:31:19 +01:00
Nicholas Staples
f3210ea992 Functionality added to download all on activity page. All tests passing. 2016-04-19 11:45:36 +01:00
Chris Hill-Scott
b75ab7c3df Make new service current service on first use
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.
2016-04-19 11:04:00 +01:00
Chris Hill-Scott
37f341e757 Make tour work for non-logged-in users
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
2016-04-19 10:38:16 +01:00
Chris Hill-Scott
a0e3a648f3 Fix innacurate error message on CSV check
We only know if a row contains missing cell(s), not how many cells are
missing data.

This commit changes the error message to be more accurate.
2016-04-18 11:47:53 +01:00
Nicholas Staples
2085792742 Add created_by to all appropriate requests. 2016-04-15 11:08:19 +01:00
Nicholas Staples
6d9de1a500 Make service live and revert working, all tests passing. 2016-04-14 15:38:34 +01:00
Nicholas Staples
a6a42d6f26 Fixed bug for subject not updating when changed on the edit template page. 2016-04-14 14:08:35 +01:00
Nicholas Staples
3865c722fc Updated notifications_utils version and associated code. Added email subject formatting for placeholders. 2016-04-14 12:00:55 +01:00
Chris Hill-Scott
2a03cd3952 Merge pull request #431 from alphagov/sort-template-stats
Sort template stats by usage
2016-04-13 16:15:33 +01:00
Nicholas Staples
a6d1c5b693 Download CSV option now available.
App is updated to use the rebased db.
2016-04-12 15:38:02 +01:00
Chris Hill-Scott
4568c0e5ab Sort template stats by usage
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
2016-04-12 12:03:52 +01:00
Chris Hill-Scott
42a6e801e4 Merge pull request #426 from alphagov/reword-recent-templates
Reword ‘recent templates’ section of dashboard
2016-04-12 10:06:27 +01:00
Chris Hill-Scott
a2263f959e Merge pull request #422 from alphagov/commas-in-placeholders
Don’t allow commas in placeholders
2016-04-12 10:06:08 +01:00
Chris Hill-Scott
7e54703e2f Reword ‘recent templates’ section of dashboard 2016-04-11 10:08:03 +01:00
Chris Hill-Scott
2912ea1806 Increase number of rows shown
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.
2016-04-08 10:55:24 +01:00
Chris Hill-Scott
25079464b0 More helpful error when signed in an accept invite 2016-04-08 10:55:20 +01:00
Chris Hill-Scott
dfd8540b54 Don’t allow commas in placeholders
> 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
2016-04-08 07:46:14 +01:00
Nicholas Staples
8f8cdabfff Upload csv location updated, all tests passing. 2016-04-07 12:56:57 +01:00
Adam Shimali
d7c59fa8d7 Aggregation of template stats in admin app.
Individual templates stats items fetched from admin.
2016-04-07 10:55:21 +01:00
Chris Hill-Scott
b5915dc956 Merge pull request #408 from alphagov/host-email-image
Host image used in email template in app
2016-04-07 09:38:48 +01:00
Chris Hill-Scott
66506d18bb Host image used in email template in app
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
2016-04-07 09:29:05 +01:00
Nicholas Staples
2352b0f80d Fix issue with uppercase in the domain name. 2016-04-06 16:45:35 +01:00
Adam Shimali
2dbf522932 Add date field back into template stats 2016-04-06 15:06:02 +01:00
Chris Hill-Scott
65860c458b Merge pull request #397 from alphagov/human-readable-phone-numbers
Make it easier to deal with phone numbers in spreadsheets
2016-04-06 11:44:32 +01:00
Chris Hill-Scott
2abc336a0c Make phone numbers human readable
- in the example table on the ‘send’ page
- in the example CSV files

Implements: https://github.com/alphagov/notifications-utils/pull/18
2016-04-06 11:31:37 +01:00
Nicholas Staples
f0b604084c Fixed email bug and added new exhaustive tests. 2016-04-06 11:01:37 +01:00
Chris Hill-Scott
686493ed8f When a user accepts an invite, show them the tour
It’s jarring to be sent right into the dashboard.

We think the tour makes things less jarring.
2016-04-05 16:21:06 +01:00
Adam Shimali
eade0ef971 Added test for template stats client.
Removed date column from recently used templates table.
2016-04-05 13:50:42 +01:00
Adam Shimali
159fe60c1a Template statistics now surfaced on dashboard.
Job list removed.

Template statistics retrieved at same time as
notification stats.
2016-04-05 11:47:24 +01:00
Chris Hill-Scott
b912fa3f66 Merge pull request #376 from alphagov/dont-accepted-csv-with-restricted-recipients
Show error if restricted service uploads real CSV
2016-04-05 10:16:20 +01:00
Chris Hill-Scott
c95123914a Fix re-uploading of CSV files
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
2016-04-05 09:02:52 +01:00
Chris Hill-Scott
7a0a81c07c Show error if restricted service uploads real CSV
Implements: https://github.com/alphagov/notifications-utils/pull/16

Also changes a bunch of the mocked phone numbers to be real-looking so
that the tests are checking for the right kind of error.
2016-04-04 17:17:52 +01:00