Commit Graph

2143 Commits

Author SHA1 Message Date
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
Chris Hill-Scott
facfb98bb3 Merge pull request #744 from alphagov/tour-to-dashboard
Go to the dashboard after finishing the tour
2016-07-01 14:18:08 +01:00
Chris Hill-Scott
3689919ae6 Merge pull request #742 from alphagov/view-of-deleted-template
Don’t show send/edit links for deleted template
2016-07-01 14:17:54 +01:00
Chris Hill-Scott
25829762bf Add ‘get started’ back to the dashboard
Since we’re removing the write email/write text message calls to action
from the tour, we should reintroduce them to the dashboard, for users
who are unsure what they should do next.
2016-07-01 14:00:45 +01:00
Chris Hill-Scott
9e98ed3304 Remove trial mode banner from dashboard
No-one ever looked at this.
2016-07-01 14:00:36 +01:00
Chris Hill-Scott
721212816d Redirect to the dashboard after the tour
After the tour we should ground users by dropping them on the dashboard.

In the background, we delete the example text message template. This
means that users start from a clean slate when they go to add their own
templates

This also means some wording changes to the tour so it still makes
(some) sense:

- 1, 2 and 3 should refer to the current step, not describe the next
  one
- the link should take you to the dashboard
- change from ‘Get started’ to ‘Try this example’ because we’re using
  ‘Get started on the dashboard’
2016-07-01 13:47:51 +01:00
Chris Hill-Scott
02dccde0bd Don’t show send/edit links for deleted template
Since you can’t really send or edit a deleted template we should show
a message telling you that the template has been deleted.

This is important because deleted templates still show up in the
template statistics.
2016-07-01 13:35:48 +01:00
Chris Hill-Scott
a5a35f1a6b Don’t create an example email template
We reckon that:

- a ‘blank slate’ templates page is a better start
- the example template hurt more than it helped when it comes to
  understanding placeholders
2016-07-01 13:26:57 +01:00