Commit Graph

1764 Commits

Author SHA1 Message Date
Pete Herlihy
f343d23915 Added new request to go live fields to deskpro tickets 2016-10-24 13:01:23 +01:00
Pete Herlihy
3ff5be00a8 Added new form elements to request to go live page 2016-10-24 12:52:51 +01:00
Pete Herlihy
7c74864dfe Added request to go live form elements 2016-10-24 12:45:45 +01:00
Rebecca Law
f02bcd3338 Merge pull request #984 from alphagov/confirm-email-change
Send an email to the user when they change email address
2016-10-14 16:00:47 +01:00
Rebecca Law
789ba58c2e Removed unused form.
And used session.pop to remove NEW_EMAIL from the session.
Also removed variable not being used in user_profile.
2016-10-14 14:46:31 +01:00
Chris Hill-Scott
c6b740976e Merge pull request #981 from alphagov/fix-api-page-firefox
Fix API log page in Firefox
2016-10-14 13:28:38 +01:00
Rebecca Law
a0e7d569e9 Send an email to the user when they change email address
This PR changes the flow to change an email address.
Once the user enter their password, they are told "Check your email".
An email has been sent to them containing a link to notify which contains an encrypted token.
The encrypted token contains the user id and new email address. Once the link is clicked the user's email address is updated to the new email address.
They are redirected to the /user-profile page.

Also in this commit is an update from flask.ext.login to flask_login.
2016-10-13 17:05:37 +01:00
Pete Herlihy
366be2af71 Merge pull request #983 from alphagov/statuspage-footer
Added a link to the system status page
2016-10-13 14:28:59 +01:00
Pete Herlihy
20da2d815e Changed System status to top of the support links. 2016-10-13 14:20:40 +01:00
Pete Herlihy
6cea0aeee9 Added a link to the system status page
Changed the footer headings to better reflect what you get there...
2016-10-13 14:06:40 +01:00
Imdad Ahad
d099a080e6 Add ids for dashboard numbers and stats to be used by the functional tests 2016-10-13 10:52:09 +01:00
Chris Hill-Scott
f561bfe603 Show expander arrow for all browsers
The polyfill we use for details/summary only renders the arrow if the
browser doesn’t natively support the feature.

The latest versions of Firefox _do_ now support the feature (after 5
years), but for some reason they don’t draw the arrow. So this commit
forces the arrow to be polyfilled in all browsers, and hides the browser
default one, for those browsers that do render it.
2016-10-12 15:55:53 +01:00
Chris Hill-Scott
c13f1aa5d1 Fix API log page in Firefox
The details of each notification were not being hidden on page load in
Firefox.

Firefox does not natively support the `<details>` element, so we
polyfill it.

Because of the way the polyfill is written[1]

1. There can’t be any `<div>` elements inside the `<summary>` (this
   commit changes them to be `<span>`s instead, and adds CSS to make
   sure they wrap as before)
2. The contents to be shown/hidden must be wrapped in a `<div>` (which
   this commit adds)

***

1. 48fde82c72/public/javascripts/govuk/details.polyfill.js (L90)
2016-10-12 15:28:38 +01:00
Leo Hemsted
12d1b64a90 fix broken string 2016-10-12 13:54:23 +01:00
Leo Hemsted
e4f0656a32 remove filtering of test messages from jobs
this is now down on the api side
2016-10-12 13:54:22 +01:00
Chris Hill-Scott
b48874dbad Fix all jobs being shown on the dashboard
The dashboard was showing the 50 most recent jobs, not the 50 most
recent in the last 7 days.
2016-10-12 11:31:59 +01:00
Leo Hemsted
daa848f4c5 Merge pull request #965 from alphagov/paginate-dashboard
Limit jobs on the dashboard
2016-10-11 11:36:22 +01:00
Chris Hill-Scott
645e935f55 Revert "Revert "Don’t let people create a normal key in trial mode""
Reverts alphagov/notifications-admin#976
2016-10-11 10:42:11 +01:00
Leo Hemsted
8464c67a3d move job statuses to job_api_client
prevent code duplication and a good excuse to use set subtraction
2016-10-11 10:35:33 +01:00
Leo Hemsted
0fdd38b9c5 add tests for new jobs functionality 2016-10-10 17:15:57 +01:00
Chris Hill-Scott
8e323a81a8 Revert "Don’t let people create a normal key in trial mode" 2016-10-10 16:50:46 +01:00
Chris Hill-Scott
13227606a9 Merge pull request #973 from alphagov/remove-documentation
Remove documentation pages
2016-10-10 16:01:09 +01:00
Chris Hill-Scott
1fccc524a1 Remove documentation pages
These are out of date now and potentially misleading.

Adds a new error page for HTTP `410 GONE`. Looks like the 404 page, but
returns the appropriate error code to be a good web citizen.
2016-10-10 15:58:11 +01:00
Leo Hemsted
dbe4400441 paginate jobs page
(only views/jobs/jobs.html, which is the drill-down page, not the dashboard view)
2016-10-10 15:43:01 +01:00
Leo Hemsted
ebb590bc5d clean up generate_previous_next_dict
separate it into two functions to avoid repeatedly passing in the same parameters everywhere, and removed some unused if blocks
2016-10-10 15:43:01 +01:00
Leo Hemsted
aa458a15da update tests to reflect new code
also change jobs.py to filter out test jobs (since we dont need to see em)
and to use the new statuses filter rather than filtering on front end
2016-10-10 15:43:01 +01:00
Leo Hemsted
441a2717f2 make dashboard jobs list hit job api twice
once for scheduled jobs, once for past jobs

this ensures that if you have lots of scheduled jobs it can still return your last 50 jobs
2016-10-10 15:43:01 +01:00
Leo Hemsted
be97edce7f make add_rate_to_jobs singular
there was no reason for it to operate on a whole list at a time
2016-10-10 15:43:01 +01:00
Leo Hemsted
549a17c1f7 separate get_job and get_jobs in job_api_client
also remove the status parameter, as we never use it anywhere
2016-10-10 15:43:01 +01:00
Chris Hill-Scott
90d4fcaa52 Don’t let people create a normal key in trial mode
You can’t properly use a normal key when your service is in trial mode.

It’s theoretically useful to create a live key in preparation for going
live. This utitily outweighs the confusion it causes for people creating
their first keys in trial mode.

We should just remove the confusing option.
2016-10-10 14:40:13 +01:00
Chris Hill-Scott
5bb700ac81 Merge pull request #970 from alphagov/whitelist-live
Make whitelist available to live services
2016-10-10 11:39:11 +01:00
Chris Hill-Scott
eab1d134b2 Add a flash message when a user saves whitelist
I saw users in research going back into the whitelist to check that it
had saved because there’s no feedback.

This commit adds a flash message to confirm that the whitelist was saved
OK.
2016-10-07 15:06:47 +01:00
Chris Hill-Scott
73469c1067 Make whitelist available to live services
Why would a live servie need the whitelist? Because the team key will
also let you send to members of your whitelist (so this commit relabels
it to say so).
2016-10-07 15:01:49 +01:00
Pete Herlihy
0a21d30f4b Removed service name from the title tag on dashboard 2016-10-07 12:20:39 +01:00
Pete Herlihy
4632affc3f Removed the incorrect bit about not needing an MOU for low volumes. 2016-10-05 16:35:08 +01:00
Chris Hill-Scott
2e82731bf3 Don’t include hostname in page passed to analytics
Analytics only expects to get the path part of the URL, not the full
URL.
2016-10-05 16:31:22 +01:00
Chris Hill-Scott
b760457ba9 Add monthly breakdown of usage
Basically:
- shows all the months from start of given financial year to now or end
  of given financial year (whichever is earliest)
- shows a breakdown of free and paid text messages for each of these
  months

Depends on:
- [x] https://github.com/alphagov/notifications-api/pull/699
2016-10-05 16:11:19 +01:00
Chris Hill-Scott
0a0bfa9232 Merge pull request #962 from alphagov/re-add-analytics
Re-add Google Analytics
2016-10-05 14:49:01 +01:00
Chris Hill-Scott
4ea7d806fb Remove UUIDs from URLs sent to Google Analytics
If all our URLs are unique (because they contain service/job/template
IDs) then it makes it hard to aggrate how users are behaving across a
range of services/jobs/templates.

This commit replaces anything that looks like a UUID in a URL with `…`.
2016-10-05 10:58:33 +01:00
Chris Hill-Scott
e095d6024c Revert "Remove Google Analytics"
This reverts commit f31170f5a2.
2016-10-05 10:55:04 +01:00
Chris Hill-Scott
3069858a9f Fix pagination on activity page
The activity page was AJAXified in
https://github.com/alphagov/notifications-admin/pull/952 but this
didn’t take pagination into account.

So if you visited page 2, the contents of the page would be replaced by
Javascript with the contents of page 1. So you’d never be able to see
anything beyond page 1, expect for a brief fraction of a second when the
page loaded.

This commit makes sure the AJAX request uses whatever page parameter is
in the URL of the original page.
2016-09-30 15:41:46 +01:00
Rebecca Law
2eb7360468 Merge pull request #959 from alphagov/remove-user-from-service
Allow platform admin to edit users.
2016-09-30 14:07:20 +01:00
Chris Hill-Scott
e682f6a5f9 Merge pull request #958 from alphagov/revert-add-analytics
Remove Google Analytics
2016-09-30 13:49:14 +01:00
Rebecca Law
5a50c945c7 Allow platform admin to edit users. 2016-09-30 11:48:16 +01:00
Chris Hill-Scott
f31170f5a2 Remove Google Analytics
Reverts https://github.com/alphagov/notifications-admin/pull/306

We’re not looking at the data from Analytics, so shouldn’t be collecting
it just in case.

<sup>Brought to you by the fun police.</sup>
2016-09-30 09:23:00 +01:00
Pete Herlihy
b08c667376 Typo corrections 2016-09-29 15:49:08 +01:00
Pete Herlihy
28f7a55b5c Added the remember_me cookie info to the cookies page. 2016-09-29 15:48:04 +01:00
Chris Hill-Scott
46426217f9 Give platform admin users visibilty of API pages
Platform admins should be able to see what’s going on with a service’s
API integration, including:
- messages sent
- contents of whitelist
- names of keys

They should also be able to revoke keys in an emergency.

The only thing they _shouldn’t_ be able to do is create new keys
(because then they’d be able to send messages as the service).
2016-09-29 12:57:57 +01:00
Chris Hill-Scott
fdeb2997fb Stop whitelist form autocompleting
The browser tries to be helpful by autofilling email addresses and
phone numbers. But it gets confused and tries to fill all the fields
with the same email address or phone number. This looks broken.

This commit disables autocomplete for these form fields.
2016-09-29 10:21:08 +01:00
Chris Hill-Scott
6c96b90922 Make relative timestamps update automatically
It’s weird to be on a page that says ‘2 seconds ago’ and stays stuck
there.

We don’t want to AJAX the whole page because it would get in the way of
interacting with the list of notifications.

This commit adds the venerable jQuery Timeago[1] plugin to keep the
relative times accurate and fresh.

1. http://timeago.yarp.com/
2016-09-29 09:28:13 +01:00