Commit Graph

2150 Commits

Author SHA1 Message Date
Pete Herlihy
488de1ce7c Removed 'states are the same for email and text' blurb. 2016-07-11 15:01:28 +01:00
Chris Hill-Scott
5f67560b1e Link to failure reasons from job/activity pages
If something has failed and you don’t know why, you should be able to
find out why. Let’s try adding a link to the page explaining why, so
it’s not just buried in the footer.
2016-07-11 14:01:42 +01:00
Chris Hill-Scott
d22b2f678d Make ‘message’ plural when talking about retries
In each of these cases the previous sentence talks about messages,
plural, so these lines should agree.
2016-07-11 13:57:05 +01:00
Chris Hill-Scott
90bdf51e3a Rename failure status on delivery page
…so that they agree with what we show in the interface/CSV, eg ‘phone
does not exist’ instead of ‘permanent failure’.
2016-07-11 13:55:02 +01:00
Chris Hill-Scott
8d59b51387 Use shorter sentences to describe sending state
It was running on a bit…
2016-07-11 13:54:37 +01:00
Chris Hill-Scott
50c20ce680 Add formatted notification status to CSV
This commit makes the CSV download use the same language for failure
reasons as the frontend.

It also adds a test around this stuff, which was patchily tested before.
2016-07-11 13:12:46 +01:00
Chris Hill-Scott
f9a9048579 Make ‘temporary failure’ error less cryptic
‘Phone number doesn’t exist’ as opposed to ‘Permanent failure’ has
tested well because it talks in terms of things people understand.

We should do the same for ‘Temporary failure’, because users are
unclear:
- why this is happening
- if it’s temporary, is Notify going to retry it (it’s not)

We think that ‘Phone/inbox not currently accepting messages’ answers
makes these things clearer.

I’ve reworded it slightly to:

- ‘Inbox not accepting messages right now’
- ‘Phone not accepting messages right now’
2016-07-11 11:18:01 +01:00
Chris Hill-Scott
d33c254fa5 Merge pull request #743 from alphagov/hide-delivery-download-tour
Hide download CSV link when in the tour
2016-07-08 16:31:16 +01:00
minglis
071117cbb1 Merge pull request #771 from alphagov/use-python-3-in-bootstrap
using python3 in falback venv
2016-07-08 14:45:36 +01:00
Martyn Inglis
0cc3bb5970 using python3 in falback venv 2016-07-08 14:38:59 +01:00
Chris Hill-Scott
ec01eee7b9 Merge pull request #766 from alphagov/visual-refactor-team-page
Visual refactor team page
2016-07-08 09:02:20 +01:00
Chris Hill-Scott
5410fb2f64 Merge pull request #765 from alphagov/fix-large-file-uploads
Fix 500 being thrown when uploading large files
2016-07-07 15:33:31 +01:00
Leo Hemsted
a67fe56907 Merge pull request #763 from alphagov/api-key-types
Api key types
2016-07-07 14:58:31 +01:00
Leo Hemsted
4a81a1f82b Merge pull request #764 from alphagov/rates
mmg rates set to 1.65p
2016-07-07 14:58:10 +01:00
Chris Hill-Scott
7edff47410 Put email address on team page
Right now, a user can change their name and masquerade as someone else
and the service manager has no way of telling who is who.

This is also true for platform admins, where they can see the users of
a service but can’t identify which department they are from.

This commit adds a user’s email address next to their name to remedy
this.
2016-07-07 12:43:37 +01:00
Chris Hill-Scott
f9ebb337e3 Tidy layout of team page
The team page was a bit of a mess:

- invited and active tables didn’t line up
- lots of things were wrapping onto two lines
- the empty fields for when a user didn’t have permissions looked broken

This commit splits each row of the table (not actually a table any more)
onto two lines. First line has the user’s info, second has their
permissions and any associated actions.
2016-07-07 12:43:35 +01:00
Chris Hill-Scott
84a2862387 Fix 500 being thrown when uploading large files
This is re-fixing a bug which was re-introduced when adding the
`Spreadsheet` class in 1409ca36ca.

It was previously fixed in 19662d8329:

>  Fix bug with large file uploads
>
>  Depending on the size of the uploaded file, Flask will temporarily store
>  it in different ways. This means that it comes back as a `TempFile` if
>  the file is roughly <500k and as `BytesIO` if the file is larger.
>
>  `TempFile` supports the `.getvalue()` method, but `BytesIO` does not.
>  Both support the `.read()` method, so this commit changes to use that
>  instead.
2016-07-07 11:52:57 +01:00
Chris Hill-Scott
60f79afb6b Make the date take up less space 2016-07-07 09:18:49 +01:00
Chris Hill-Scott
8b9704df0e Restore API keys table to 2 columns
Because it get ugly when there’s 3 columns and everything is wrapping.
2016-07-07 09:03:20 +01:00
Leo Hemsted
aac3112274 mmg rates set to 1.65p
also moved a default parameter to a plain ol' local variable to reduce ambiguity about whether it is overriden by any callers (it's not)
2016-07-06 16:10:19 +01:00
Leo Hemsted
630b5df552 Save api_key.key_type from radio buttons 2016-07-06 15:10:36 +01:00
Chris Hill-Scott
c0c516ba7a Make documentation its own section of the page
This visually chunks the page up into three parts:
- keys
- service ID
- documentation

Also fixes the documentation link (because it’s not service-specific).
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
01df039aab Indicate the type of key in the table of keys
When looking at your keys, it’s useful to know which are `test`/`team`.

Default (`normal`) keys don’t get a label.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
7fcd56dc02 Add radio buttons for choosing the API key type
Best-guess wording for what the labels and question should be.

Adds a macro for rendering radio buttons from a WTForms field.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
49d8e68589 Rename ‘Add a new API key’ page
‘Create’ matches the text of the button on the previous page.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
ddef996f34 Rename ‘API keys’ page to ‘API integration’
Since this page is more than just your API keys, it should be named
something else.

Hopefully the word ‘integration’ will give non-techical users a clue
that it’s possible to use Notify without doing the CSV dance.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
80e0832f7d Make a function for parsing help query param
Our templates are a littered with `request.args.get('help', '0')`.
This commit refactors these into a single helper method, which can be
used by the view functions, then passed to the template.

This makes the templates cleaner, and should make it easier to refactor
`help` out of the query parameters entirely in the future.
2016-07-05 17:29:41 +01:00
Chris Hill-Scott
d71269ca87 Hide download CSV link when in the tour
There is really no point to downloading the CSV file of delivery
info when you’re in the tour. It’s just distracting at this point.
2016-07-05 17:29:10 +01:00
Chris Hill-Scott
dfbd6610cb Merge pull request #741 from alphagov/revert-template-actions
Revert questionable design decisions in send messages flow
2016-07-05 16:58:20 +01:00
Pete Herlihy
234691b892 Merge pull request #760 from alphagov/whitelist-domains
Whitelist domains
2016-07-05 16:51:26 +01:00
Pete Herlihy
f746266b3d Fixed typo 2016-07-05 16:39:50 +01:00
Pete Herlihy
d300900dee Added Kainos to the whitelist of registerable user domains 2016-07-05 16:39:09 +01:00
Chris Hill-Scott
823a6314b3 Merge pull request #757 from alphagov/dist-tests
Make tests run faster by using multiple CPU cores
2016-07-05 10:53:59 +01:00
Chris Hill-Scott
e775ea2446 Delete commented out lines
These aren’t being used, so why have them?
2016-07-05 09:28:20 +01:00
Chris Hill-Scott
9ced677ec7 Run tests on multiple CPU cores
We can make the tests run slightly faster by parallelizing them across
multiple CPU cores:

- from some casual testing locally, 2 cores gives the optimum speedup
- Travis container-based builds have 2 CPU cores available[1]
- the net gain is about 20%, or 2 seconds
- unfortunately we can’t do this on the API because each test is still
  using the same instance of the database

1. https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
2016-07-05 09:27:50 +01:00
Chris Hill-Scott
47a1bbce8e Merge pull request #751 from alphagov/fix-get-started
Fix get started banner on dashboard
2016-07-04 15:33:51 +01:00
Adam Shimali
3858f695a3 Merge pull request #753 from alphagov/better-flash
Better flash messages for setting text message sender.
2016-07-04 15:27:07 +01:00
Adam Shimali
5c62a14b2d Parameterize test 2016-07-04 14:53:34 +01:00
Chris Hill-Scott
710da9b5b6 Fix link going to wrong page from dashboard
Should be one link for email, one for SMS, not two for email.
2016-07-04 14:28:54 +01:00
Adam Shimali
4edd308a54 Better flash messages for setting text message sender. 2016-07-04 13:46:50 +01:00
Chris Hill-Scott
cddfd6c517 Fix get started banner on dashboard
This banner was always being shown because the template was never
getting sent the service’s templates from the API.

This commit fixes this to only show the banner when a service has no
templates, and adds some tests to make sure it doesn’t happen again.
2016-07-04 13:15:32 +01:00
Chris Hill-Scott
eb32393551 Merge pull request #734 from alphagov/refactor-dashboard-extensive
Refactor markup behind the AJAX bits of the page
2016-07-04 12:46:34 +01:00
Adam Shimali
556bf380e0 Merge pull request #747 from alphagov/set-sms-sender
Set text message sender
2016-07-04 10:31:43 +01:00
Adam Shimali
1efd8506db Can remove sms sender. 2016-07-01 16:32:21 +01:00
Chris Hill-Scott
924dda4ef2 Fix back link on send test 2016-07-01 14:27:58 +01:00
Chris Hill-Scott
3241710a96 Rename check and confirm to preview
We’ve seen people land on this page and expect the message to be on
their phone already.

‘Check and confirm’ sounds a lot like ‘check your phone’, which is
language that we use earlier on when we _have_ sent a message.

Hopefully ‘preview’ is a better indication that it’s not sent yet.
2016-07-01 14:27:58 +01:00
Chris Hill-Scott
c3f347760a Don’t hide the example on the send page
People missed this example because it was hidden in a `<details>`
element. Perhaps the wording of the link wasn’t ideal, but we’ve
tried two different varations of it (https://github.com/alphagov/notifications-admin/pull/640)

Better not to hide things, than try to think of some text which will
make people want to show them.

Also adds some headings to chunk up this page a bit.
2016-07-01 14:27:58 +01:00
Chris Hill-Scott
8c05c08249 Reword ‘send emails’ to ‘upload recipients’
…and change the page heading on next page to match.

‘Send emails’ doesn’t speak to you if you already have the idea of a
file or address book in mind. ‘Upload’ better describes what you’re
going to do on the next page.

Also makes all the links regular weight, because having the first one
bold looked like a heading.
2016-07-01 14:27:58 +01:00
Chris Hill-Scott
46f8dd3c79 Move ‘send test’ link back to template page
This changes it back to how it was when we first introduced this
feature:
https://github.com/alphagov/notifications-admin/pull/181

It’s kind of lost on the page where you upload a file, which is a shame
because it’s a good teaching aid.
2016-07-01 14:27:14 +01:00
Adam Shimali
3bfcf0f8b3 Users can set a value that appears as the sender of a text message.
It can be up to eleven characters alpha numeric, no special characters
allowed.
2016-07-01 14:22:25 +01:00