Commit Graph

759 Commits

Author SHA1 Message Date
Chris Hill-Scott
6f1fa62714 Merge pull request #927 from alphagov/quis-patch-1
Reword resend email page
2016-09-07 15:25:33 +01:00
Chris Hill-Scott
9cf3854ac6 Merge pull request #929 from alphagov/fix-trial-mode-500
Fix 500 on trial mode page
2016-09-07 15:01:49 +01:00
imdadahad
be60e74a21 Merge pull request #926 from alphagov/add-redirect-for-email-verification
Redirect and resend verification email when pending user attempts to login
2016-09-07 14:23:56 +01:00
Chris Hill-Scott
743377f6b7 Fix 500 on trial mode page
I was using the trial mode page to prototype the time picker as part of
225a61ddd3.

I didn’t clean up properly, and left an errant undefined variable, which
caused the trial mode page to `500`.

This commit:
- removes the errant argument
- adds a test for all the static pages to make sure that they at least
  return a `200`
2016-09-07 10:49:57 +01:00
Chris Hill-Scott
897b89ba6e Make missed content changes on password sent page
Lose the ‘now‘ like in: https://github.com/alphagov/notifications-admin/pull/877

Lose the ‘we‘ like in: https://github.com/alphagov/notifications-admin/pull/884
2016-09-06 17:22:27 +01:00
Chris Hill-Scott
93ca29eab8 Merge pull request #922 from alphagov/cancelled-jobs
Let users cancel a job
2016-09-06 17:12:19 +01:00
Chris Hill-Scott
9865c2916f Reword resend email page
Changes the wording to match: 166870c536/app/templates/views/registration-continue.html (L10)

We don’t use ‘we‘.

The ‘in order to‘ bit is unnecessarily verbose.
2016-09-06 16:59:26 +01:00
Chris Hill-Scott
eb11615a32 Add a cancel job button
If you schedule a job you might change your mind or circumstances might
change. So you need to be able to cancel it. This commit adds a button
on the job page which hits the `…/cancel` API endpoint for a job.
2016-09-06 16:55:24 +01:00
Imdad Ahad
91c878a80e Remove flash banner as unncessary 2016-09-06 16:53:53 +01:00
Imdad Ahad
998d33e283 Redirect and resend verification email when pending user attempts to login 2016-09-06 15:44:33 +01:00
Chris Hill-Scott
166870c536 Merge pull request #924 from alphagov/fix-trial-mode-message
Fix bug where every service was ‘in’ trial mode
2016-09-06 13:51:14 +01:00
Chris Hill-Scott
ffdd20351e Fix bug where every service was ‘in’ trial mode
The message on the service settings page was being shown for every
service, whether or not they were in trial mode. It also tests for both
cases.
2016-09-05 15:08:18 +01:00
Martyn Inglis
2f56643e3a Fix up issues caused by merge
- statistics now on job_json
- removed test that validates we handle the case where job has no statistics key - never happens
2016-09-05 14:45:34 +01:00
Martyn Inglis
1ad2665bfe Merge branch 'master' into remove-code-that-handled-old-new-job-api
Conflicts:
	app/main/views/jobs.py
	app/notify_client/job_api_client.py
2016-09-05 14:29:58 +01:00
Martyn Inglis
1732415b45 Fixed formatting issues 2016-09-05 13:38:47 +01:00
Chris Hill-Scott
c94675f457 Don’t show cancelled jobs anywhere
The information about a job doesn’t make sense if a job is cancelled.

We could change the information to reflect that the job won’t be sent/
wasn’t sent/was cancelled, but there’s nothing you can really do with
this info.

So instead let’s:
- hide cancelled jobs from the dashboard
- hide cancelled jobs from the jobs page
- 404 the page if the user tries to click back enough times to hit the
  job page
2016-09-02 12:44:36 +01:00
Chris Hill-Scott
be90cf2783 Make sure create job client can handle statistics
The create job endpoint returns the data about the job with a `data:`
wrapper. This commit makes sure that, when the client is trying to
process a job which has just been created, it looks inside the `data`
wrapper.
2016-09-01 13:43:15 +01:00
Chris Hill-Scott
6921d8b59e Sort scheduled jobs so soonest is first
The scheduled job you probably care about the most is the soonest –
irrespective of when you scheduled it.
2016-08-31 16:59:24 +01:00
Chris Hill-Scott
661f5ba702 Don’t allow test messages to be scheduled
For two reasons:
- it’s extra stuff in tour that users dont yet need to know about
- test messages are hidden from the dashboard, so you’d have no
  visibility of when they were sending once you’d scheduled them
2016-08-31 16:59:04 +01:00
Chris Hill-Scott
31a032e678 Show message on job page if job is scheduled
If a job is scheduled then we can’t show the notifications yet, and the
progress report will stay at 0%.

In their place we should show what time a job will start.

Later on (when the API is ready) this area of the page should also show
a cancel button.
2016-08-31 16:58:52 +01:00
Chris Hill-Scott
4342b721f1 Show upcoming jobs on the dashboard
On the dashboard:
- adds a new ‘in the next 24 hours’ section to the dashboard which lists
  upcoming jobs
- tweaks some spacing on the dashboard so that it doesn’t look like too
  much of a mess
- don’t show scheduled jobs in the table of normal jobs

On the jobs page:
- don’t show scheduled jobs
2016-08-31 16:58:43 +01:00
Chris Hill-Scott
3d8d160d3e Always use 12h times
The GOV.UK content style guide says:

> - 5:30pm (not 1730hrs)
> - midnight (not 00:00)
> - midday (not 12 noon, noon or 12pm)

This commit changes all times to be 12h not 24h, and adds a special case
for when a time is exactly 12:00am or 12:00pm.
2016-08-31 16:58:34 +01:00
Chris Hill-Scott
c1415c0429 Make conftest use job_status not status
`status` will be deprecated at some point. `job_status` is what gets
set to `scheduled` to show that a job has been scheduled for some time
in the future.
2016-08-31 16:58:26 +01:00
Chris Hill-Scott
ec1e0debe6 Reduce unnecessary indentation 2016-08-31 16:58:18 +01:00
Chris Hill-Scott
225a61ddd3 Add a component for picking the time to send a job
Users need to pick a time in the next 24hrs, or send a file immediately.

Rationale for this is a bit lost in time-before-holiday, but generally:

‘Now’ and ‘later’ as the inital choices makes it really clear what
this feature is about conceptually.

The choice of times is absolute, eg ‘1pm’ not ‘in 3 hours’
2016-08-31 16:58:09 +01:00
Chris Hill-Scott
bf872ab342 Base ‘% complete’ on notifications requested
The job is complete when all notifications are delivered or failed.

The report is complete once we have all notifications are in the
database.

This commit changes the meaning of the percentage from the former to the
latter. This is how it was before we removed the aggregate stats for
jobs.
2016-08-30 15:16:36 +01:00
Chris Hill-Scott
7324b30dbc Re-add a 'requested' stat to a job
It’s useful to know how many notifications we’ve handed off to our
providers. This is a measure of how complete the processing of the job
is.

This is important, because once the job processing is complete then you
can accurately reconcile the report with the CSV file that you’ve
uploaded.
2016-08-30 14:57:28 +01:00
minglis
1651c72b3d Merge pull request #912 from alphagov/fix-dashboard-page
Fix dashboard page
2016-08-30 11:00:29 +01:00
Chris Hill-Scott
8ff70f0814 Merge pull request #904 from alphagov/make-settings-page-a-table
Make settings page a table and do a better job of explaining the reply to address/text message sender
2016-08-26 15:49:49 +01:00
Martyn Inglis
fc3af8b56e Extra test for the zero stats case 2016-08-26 15:27:04 +01:00
Martyn Inglis
8c159da3ea Fix for admin app to show job data on dashboard page
- uses the new stats block in the API to build the stats expected by the dashboard page
- all work done in client
2016-08-26 15:21:10 +01:00
Leo Hemsted
4fbd23d5e9 Merge pull request #907 from alphagov/plat-admin
Platform admin stats rework
2016-08-26 13:51:36 +01:00
Martyn Inglis
fb9b33e3de Removed check on notifications-sent, that was used to check whether it was old or new style API.
Now new style is deployed it's not needed.

Tests updated to reflect this,
2016-08-25 12:54:23 +01:00
minglis
9a60cf49a4 Merge pull request #899 from alphagov/handle-new-jobs-api
Handle new jobs api
2016-08-25 09:56:30 +01:00
Leo Hemsted
6ad7b019ea added tests for reworked platform admin page 2016-08-24 17:39:20 +01:00
Leo Hemsted
b983f020ff remove old statistics_api_client
now unused - replaced mock fn with detailed_services too
2016-08-24 16:26:08 +01:00
Chris Hill-Scott
58b2a8a825 Make email branding settings a table
So that it matches the other settings on this page
2016-08-24 15:26:04 +01:00
Chris Hill-Scott
c5c693ef0b Add some explaining to the SMS sender page 2016-08-24 15:26:03 +01:00
Chris Hill-Scott
05a493f1e8 Remove ‘suspend API keys’
This was an early reckon feature. There were a few of problems with
it:
- it worked on the service, not just on the API keys as described
- it was back to front, ‘suspending’ a service set `active` to `True`,
  reactivating it set `active` to `False`
- no part of the API actually respected the `active` flag on a service

The same intent can be acheived by either:
- revoking an API key
- having a platform admin put your service back into trial mode

So this commit removes the link and the code behind it.
2016-08-24 15:12:00 +01:00
Chris Hill-Scott
f84e8e2519 Remove flash messages when changing settings
Since we’re playing back the values in the table there’s no need to
give confirmation of the new value in a flash message.
2016-08-24 15:08:27 +01:00
Chris Hill-Scott
3719cdd115 Make settings page a table not a browse list
There’s no way of seeing what the current settings are for a service
without individually going to the pages where you can change them.

This commit replaces the list of settings with a table. The table plays
back the current value for each setting.

This is a pattern that has worked well on various services[1] as well
as on our own user profile page.

1. https://designpatterns.hackpad.com/Check-your-answers-page-2DSpTH9J0wU
2016-08-24 15:04:56 +01:00
Chris Hill-Scott
1691c1a821 Make page <title> match navigation and <h1> 2016-08-24 15:04:16 +01:00
Martyn Inglis
d56c14e147 Actually use the right exception class.
Two HTTPError classes exist. Need to use the one in notifications_python_client.
2016-08-24 12:12:19 +01:00
Martyn Inglis
d149a9691a Added tests for the 2 use cases:
used templates

unused templates
2016-08-24 12:09:38 +01:00
Martyn Inglis
6e3759eb1f Merge branch 'master' into new-api-for-deleting-templates
Conflicts:
	app/main/views/templates.py
2016-08-24 11:05:19 +01:00
Martyn Inglis
9b348880ef Test for old style stats - make sure we don't override / fail if no new block present. 2016-08-24 10:42:57 +01:00
Martyn Inglis
5b2ae43d5d Wrote some tests around the stats conversions.
Properly named the finished parameter.

Handled the root JSON key
2016-08-24 10:35:04 +01:00
Martyn Inglis
b5de1dae5e Merge branch 'master' into handle-new-jobs-api 2016-08-23 16:59:28 +01:00
Martyn Inglis
4a551329c5 Parse the JOB API response converting new style response to old style object
- allows migration of API
2016-08-23 16:58:50 +01:00
Chris Hill-Scott
cd091af9e7 Merge pull request #894 from alphagov/fix-research-mode-toggle
Fix admin app putting service into research mode
2016-08-23 14:27:02 +01:00