Commit Graph

2133 Commits

Author SHA1 Message Date
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
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
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
Rebecca Law
0d44fc770c Merge pull request #738 from alphagov/whitelisting-salesforce
Whitelisting Salesforce for account creation
2016-06-30 15:14:44 +01:00
Chris Hill-Scott
759d85876e Merge pull request #737 from alphagov/create-not-register
Remove ‘register account’ language
2016-06-30 12:33:20 +01:00
Pete Herlihy
9fe95376fc Whitelisting Salesforce for account creation
This is ahead of a story to move the domain whitelisting into the platform admin app
2016-06-30 12:26:08 +01:00
Chris Hill-Scott
052fc7c787 Remove ‘register account’ language
We always call it ‘create account’.
2016-06-30 10:46:06 +01:00
Chris Hill-Scott
d9c284418b Merge pull request #731 from alphagov/fix-password-changed-at
Use password_changed_at field from User object
2016-06-28 13:19:20 +01:00
Chris Hill-Scott
bea92df2ed Merge pull request #726 from alphagov/research-mode-platform-admin
Platform admin: Highlight service in research mode
2016-06-28 13:19:05 +01:00
Chris Hill-Scott
8a9d4e91b5 Merge pull request #725 from alphagov/replay-email
Play back the user’s email address
2016-06-28 13:18:58 +01:00
Chris Hill-Scott
ccf520f446 Derive markup dashboard from rendered partials
This commit extends the `ajax_block` component to take a `dict` of
partials, from which it can select the partial matching its `key`
argument and print its HTML to the page.

This means that the same markup is only rendered in one place, rather
than in two (individually in the JSON endpoint and as `include`s in the
parent template).
2016-06-28 13:07:20 +01:00
Chris Hill-Scott
fa01c1bc5c Make a macro for the AJAX update module
This is less repetitive than typing out the HTML with all its attributes
every time.

It also lets us wrap up the idea of ‘finished’ as a parameter, so the
AJAX code will only be initiated when it’s needed, eg if a job is still
processing.
2016-06-28 11:56:02 +01:00
Chris Hill-Scott
c761d57d1d Split the JSON responses into one key per section
Previously, the AJAX update for the dashboard was returning a big blob
of JSON with one key.

This commit splits it up to return:

- one key for each section of the page
- each containing a smaller chunk of HTML rendered from a partial

The jobs page was already working this way (pretty much) but just needed
a little tweaking to get it the same.
2016-06-28 11:55:00 +01:00