Commit Graph

519 Commits

Author SHA1 Message Date
Adam Shimali
e608b60d93 Merge pull request #589 from alphagov/import-cleanup
Removed unused imports
2016-05-18 16:26:58 +01:00
Adam Shimali
e181940966 Renamed DESKPRO_TEAM_ID to DESKPRO_DEPT_ID to match name of param in
api call.

Added DESKPRO_ASSIGNED_AGENT_TEAM_ID so that tickets routed correctly.
2016-05-18 15:03:23 +01:00
Adam Shimali
25170e7e42 Removed unused imports 2016-05-18 14:39:06 +01:00
Rebecca Law
6c14d925c5 Fix test to use a real status 2016-05-18 12:05:26 +01:00
Adam Shimali
a20fc1aa47 If user clicks failed or both filters for notifications status view,
append all other failure states to query to api.
2016-05-18 11:44:58 +01:00
Adam Shimali
e20ce561e9 Merge pull request #575 from alphagov/reply-to-email-surfaced
If service has reply to show it in form
2016-05-17 13:25:58 +01:00
Chris Hill-Scott
158d4d6c43 Merge pull request #566 from alphagov/refactor-sending
Refactor and tidy up sending
2016-05-17 11:40:09 +01:00
Adam Shimali
d141af4b94 If service has reply to show it in form 2016-05-17 11:35:10 +01:00
Chris Hill-Scott
5625ef6eee Merge pull request #558 from alphagov/template-stats-2
Make template usage on dashboard easier to scan
2016-05-17 11:26:49 +01:00
Rebecca Law
c4de547b74 Merge pull request #568 from alphagov/template_history_view
Template history view
2016-05-17 08:50:40 +01:00
Adam Shimali
ed74280044 Merge pull request #570 from alphagov/reply-to-email
Admin app settings to save reply to email address for service.
2016-05-16 17:51:05 +01:00
Chris Hill-Scott
d39717d348 Merge pull request #567 from alphagov/uncomment-out-tests
Uncomment commented-out tests
2016-05-16 14:29:10 +01:00
Adam Shimali
18a0b94d98 Admin app settings to save reply to email address for service. 2016-05-16 13:10:51 +01:00
Chris Hill-Scott
e84436d0e1 Make s3upload function return the UUID
Generating the UUID can be can be contained within this function,
thus any other part of the code using it doesn’t have to do the
ID-generating stuff itself.
2016-05-16 13:05:41 +01:00
Chris Hill-Scott
f2a5d77853 Uncomment commented-out tests
Accidentally(?) introduced in 2792bece54
2016-05-16 10:53:15 +01:00
Chris Hill-Scott
7bbc307a3e Handle files that can’t be interpreted as spreadsheets
There shouldn’t be a case where we see a `ValueError` on upload any
more. Our file handling should be robust enough to deal with whatever is
thrown at it.

This commit:
- adds test files with bad data (PNG files with their extensions changed to look
  like spreadsheets)
- catches whatever exceptions are raised by trying to parse these files
- returns a helpful flash message to the user

Anything else should raise a `500`, eg if the file can’t be uploaded to S3.
2016-05-15 22:11:01 +01:00
Chris Hill-Scott
1409ca36ca Accept common spreadsheet formats, not just CSV
We require users to export their spreadsheets as CSV files before
uploading them. But this seems like the sort of thing a computer should
be able to do.

So this commit adds a wrapper class which:
- takes a the uploaded file
- returns it in a normalised format, or reads it using pyexcel[1]
- gives the data back in CSV format

This allows us to accept `.csv`, `.xlsx`, `.xls` (97 and 95), `.ods`,
`.xlsm` and `.tsv` files. We can upload the resultant CSV just like
normal, and process it for errors as before.

Testing
---

To test this I’ve added a selection of common spreadsheet files as test
data. They all contain the same data, so the tests look to see that the
resultant CSV output is the same for each.

UI changes
---

This commit doesn’t change the UI, apart from to give a different error
message if a user uploads a file type that we still don’t understand.

I intend to do this as a separate pull request, in order to fulfil
https://www.pivotaltracker.com/story/show/119371637
2016-05-15 22:10:58 +01:00
Rebecca Law
fcf277c413 Merge branch 'master' into template_history_view
Conflicts:
	requirements.txt
2016-05-13 17:30:33 +01:00
Chris Hill-Scott
8a4b0ba88c Add a message count component
The logic to say ‘1 email sent’ vs ‘12 text messages sent’ is repeated
all over the place. So this commit adds a component to put it in one
place.
2016-05-13 10:26:57 +01:00
Chris Hill-Scott
1b8236f5f8 Make template usage on dashboard easier to scan
The dashboard looked a bit table-y. This commit makes four main changes:

- show a bar chart (drawn in CSS) for template usage (only shown if
  you’ve used more than one template recently)
- only break down template usage by template name, not template type
  (because that’s happening with the big numbers)
- change the style of the ‘show more’ links under each section so that
  they are all consistent, and a little less busy (one less keyline)
- remove the ‘recent templates‘ title so that the first two sections of
  the page group under ‘in the last 7 days’
2016-05-13 09:59:41 +01:00
Nicholas Staples
64e7a7b010 Update all dates to use utc, only in the template is it converted to british time.
Template versions and template version pages added.

Fix merge changes.
2016-05-12 21:34:39 +01:00
Chris Hill-Scott
bda3aa98f8 Change "test run" to "test message"
Because reasons.
Obvs.
2016-05-12 11:22:14 +01:00
minglis
daf33b03ad Merge pull request #557 from alphagov/notification_show_updated_at
Notifications display updated_at instead of created_at.
2016-05-11 16:55:37 +01:00
minglis
2388c395e3 Merge pull request #552 from alphagov/primary-providers
Added provider management pages in.
2016-05-11 16:49:47 +01:00
Henry Hadlow
e3fa1ac253 Tidy up text on forgot your password screens
Display updated_at instead of created_at for notifications.
2016-05-11 16:30:15 +01:00
Pete Herlihy
f18972755a Merge pull request #547 from alphagov/make-forgot-your-password-text-consistent
Tidy up text on forgot your password screens
2016-05-11 15:10:46 +01:00
Rebecca Law
9232ab51d5 Merge pull request #554 from alphagov/add-created_by-to-jobs
Update the jobs and activity page to show the user that created the job.
2016-05-11 14:55:29 +01:00
Rebecca Law
53fb1dcc4b Use Uploaded by instead of Created by for the label.
Move status to the last column on the table
2016-05-11 14:45:20 +01:00
Rebecca Law
1a07162f5d Shorten the list of required mocks to login. 2016-05-11 13:16:59 +01:00
Rebecca Law
46d5065297 Update the jobs and activity page to show the user that created the job. 2016-05-11 11:57:31 +01:00
Nicholas Staples
af500a96e7 Update all dates to use utc, only in the template is it converted to british time. 2016-05-11 11:20:45 +01:00
Martyn Inglis
6699442f6b Added provider management pages in.
- see priority
- change priority
2016-05-11 09:43:55 +01:00
Henry Hadlow
36da188d04 Tidy up text on forgot your password screens 2016-05-10 11:36:49 +01:00
Adam Shimali
5d7ff0cb47 Merge pull request #542 from alphagov/previous-weeks
Add a page to show delivery rates week-by-week
2016-05-09 10:17:59 +01:00
Chris Hill-Scott
50427ecd3f Add a page to show delivery rates week-by-week
Implements
https://github.com/alphagov/notifications-api/pull/286

Will always show weeks as Monday to Sunday.
2016-05-05 10:56:20 +01:00
Chris Hill-Scott
687ccad018 Make send a test teach you how placeholders work
This commit does two main things:

- adds textboxes to the send yourself a test page, so you can replace
  ((name)) with ‘Chris’, or whatever your name is
- rejigs the send page a bit to make it clearer what the CSV upload is
  for and how to use it

The idea being that, since most users go into ‘send yourself a test’
first, it teaches them about how placeholders work by making them do the
replacing themselves.
2016-05-05 08:53:00 +01:00
Adam Shimali
09117e5eeb Updated flask-login to version 0.3.2 2016-05-04 14:06:14 +01:00
NIcholas Staples
bd0afce745 Merge pull request #527 from alphagov/windows_csv
Only check on csv is the file extension.
2016-05-03 12:50:34 +01:00
Chris Hill-Scott
1d0b28f156 Merge pull request #524 from alphagov/usage
Add usage to the dashboard
2016-05-03 11:35:11 +01:00
Chris Hill-Scott
00030bc254 Add usage to the dashboard
Takes the number of emails and SMS fragments sent from:
https://github.com/alphagov/notifications-api/pull/273

Using these numbers it’s possible to show:
- how much of your allowance is left
- or how much you have spent

For now the allowance and rates are hard coded.

Only for users that have manage service.
2016-05-03 11:06:12 +01:00
NIcholas Staples
9e94d2382d Merge pull request #532 from alphagov/british_time
Times from api are now formatted to the british time.
2016-05-03 11:02:21 +01:00
Chris Hill-Scott
f6ba5ec8d0 Merge pull request #528 from alphagov/activity-improvements
Link up the last 7 days
2016-05-03 10:58:51 +01:00
Nicholas Staples
e1f3975c9a Times from api are now formatted to the british time. 2016-05-03 10:55:37 +01:00
Nicholas Staples
f581ff44d0 Only check on csv is the file extension.
Update validator logic

Update message for the validator.
2016-05-03 10:10:58 +01:00
Chris Hill-Scott
d82569f883 Fix page titles on activity page
We were getting some weirdness like ‘Failed both’.

This commit fixes the problem, and adds some tests for the page headings
to make sure they don’t break again.
2016-04-29 16:03:56 +01:00
Chris Hill-Scott
e6ed2c9ff6 Remove bumf from the API keys page 2016-04-29 14:36:56 +01:00
NIcholas Staples
96297d2989 Merge pull request #522 from alphagov/sms_msg_limit
Sms msg limit
2016-04-29 12:29:45 +01:00
Nicholas Staples
471eac209e Handling template content size error. All tests passing. 2016-04-29 09:38:59 +01:00
Andrew White
8995a86bb6 Merge pull request #520 from alphagov/redirect-to-dashboard-when-existing-service
Redirect to dashboard if this isn't the first service
2016-04-28 17:23:14 +01:00
Andrew White
7812b1cef5 Redirect to dashboard if this isn't the first service
There's no need to show the tour again if the user has previously
created a service so just redirect to the dashboard instead.
2016-04-28 16:44:12 +01:00