Commit Graph

1799 Commits

Author SHA1 Message Date
bandesz
df313ad3d4 Add minimal 404 page for Cloudfront 2016-10-27 13:13:49 +01:00
Leo Hemsted
26a985720c fix 500 errors with excel files > 500k size limit
werkzeug's internal workings keep files under 500kb in memory, and files
greater than 500kb as a TemporaryFile

(https://github.com/pallets/werkzeug/blob/0.11-maintenance/werkzeug/formparser.py#L38)

when we encounter a CSV or TSV, we call normalise_newlines, which invokes
`.read()`, however when we were passing straight into pyexcel, we called
`file.getvalue()` - this exists on BytesIO (small files) but not on
TemporaryFile objects (large files) - we were seeing 500 errors
2016-10-26 16:35:14 +01:00
imdadahad
a93333572f Merge pull request #995 from alphagov/fix-500s
Fix 500s
2016-10-25 12:20:31 +01:00
Pete Herlihy
7bf18c9fd1 Merge pull request #997 from alphagov/go-live-page
Updated the request to go live page
2016-10-24 16:28:18 +01:00
Imdad Ahad
a707bd546c Updates:
* Fix tests
* Add tests for new message format
2016-10-24 16:10:41 +01:00
Pete Herlihy
ae48bdef98 Made the request to go live fields mandatory 2016-10-24 15:46:22 +01:00
Pete Herlihy
24cad78ecb Reverting width of fields to 100% on request to go live 2016-10-24 15:38:00 +01:00
Imdad Ahad
462bacb88c Merge branch 'go-live-page' of github.com:alphagov/notifications-admin into go-live-page 2016-10-24 15:36:07 +01:00
Imdad Ahad
876832801e Fix tests and other bits 2016-10-24 15:35:51 +01:00
Pete Herlihy
0bb7fdb216 Added non breaking space to the request to go live page 2016-10-24 15:33:13 +01:00
Pete Herlihy
3c53a8a269 Added reminder to get MoU in place to top of terms page 2016-10-24 14:44:38 +01:00
Pete Herlihy
8cddc327f8 Added MoU banner warning to the request to go live page 2016-10-24 14:36:37 +01:00
Imdad Ahad
0bde2d238f Fix casing and multi-line stuff 2016-10-24 13:38:55 +01:00
Pete Herlihy
0706909419 Reduced field widths to half on go live page 2016-10-24 13:17:50 +01:00
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
Imdad Ahad
76a61ff737 Update dashboard json endpoints:
* Remove login_required decorator
2016-10-21 17:36:42 +01:00
Imdad Ahad
a05a36f2a8 Remove newline 2016-10-21 14:28:55 +01:00
Imdad Ahad
2a2a733a41 Fix 500s when requesting json after logged out:
* Update permissions decorator to make sure user is logged in first, else 401
* Stop further ajax json calls on failure
2016-10-21 14:24:21 +01:00
Leo Hemsted
09d7f6e8a6 Merge pull request #992 from alphagov/logging
Add error logging
2016-10-19 17:33:07 +01:00
Chris Hill-Scott
61328e21fc Add a scary banner 2016-10-19 13:30:15 +01:00
Chris Hill-Scott
27154bd9d2 Remove links to new pages
So that we can iterate them a bit first.
2016-10-19 13:20:07 +01:00
Henry Hadlow
e4c2fba33d Add Design patterns and content guidance 2016-10-19 13:05:43 +01:00
Henry Hadlow
db30e7aea1 Add Information security guidelines 2016-10-19 13:05:16 +01:00
Henry Hadlow
de53e9dd24 Fix quote mismatches in footer nav 2016-10-19 13:04:50 +01:00
Henry Hadlow
f5dd38769d Rearrange routes to same order as in footer nav 2016-10-19 13:03:42 +01:00
Leo Hemsted
3058a7122e log exceptions in the admin app
(we weren't previously logging anything on error!)
2016-10-19 11:54:51 +01:00
Leo Hemsted
bd07aa97a7 remove monotonic as a dependency
"On Python 3.3 or newer, monotonic will be an alias of time.monotonic from the standard library"
2016-10-19 10:39:22 +01:00
Chris Hill-Scott
2d2e701e22 Open links to documentation in new tabs
Because users have difficulty getting back to the Notify admin
interface.

The `rel` attribute mitigates against [a nasty cross-domain
vulnerability](https://mathiasbynens.github.io/rel-noopener/).
2016-10-18 13:50:25 +01:00
Chris Hill-Scott
6946d3af54 Make API key combination of secret and service ID
In research we’ve seen people mix up the service ID and API key because
they’re both 36 character UUIDs. We can’t get rid of the service ID
because it’s used to look up the API key.

Instead, we should change API key to be one long string, which contains
both the service ID, API key and (optionally) the name of the key. For
example:

```
casework_production-8b3aa916-ec82-434e-b0c5-d5d9b371d6a3-dcdc5083-2fee-4fba-8afd-51f3f4bcb7b0
```

We still need to keep the old, separate, key and service ID for a while
until people have updated their clients. But they’re now both on this
page, rather than on two separate pages, which should make for less
fussing anyway.

This shouldn’t be rolled out until the new clients are available.

- [ ] https://github.com/alphagov/notifications-python-client/pull/36
- [ ] https://github.com/alphagov/notifications-node-client/pull/10
- [ ] https://github.com/alphagov/notifications-ruby-client/pull/15
- [ ] https://github.com/alphagov/notifications-java-client/pull/38
- [ ] PHP????
2016-10-18 12:21:00 +01:00
Chris Hill-Scott
4ddc99781f Make revoked message in API keys table lighter
It’s secondary information so works better in the secondary text colour.
2016-10-18 11:57:46 +01:00
Chris Hill-Scott
138b83af68 Merge pull request #988 from alphagov/quis-patch-1
Make page <title> match <h1> on upload page
2016-10-17 17:37:02 +01:00
Pete Herlihy
72f555ba95 Merge pull request #989 from alphagov/link-to-status-page
Updated link to the new status page in the terms of use
2016-10-17 15:46:00 +01:00
Pete Herlihy
697533b347 Updated link to the new status page in the terms of use 2016-10-17 15:35:48 +01:00
Chris Hill-Scott
d75b58435b Make page <title> match <h1> on upload page 2016-10-17 15:23:24 +01:00
Chris Hill-Scott
fb906fbfdb Make ‘too many rows’ error actually work
Was using the wrong attribute name on the instance of `RecipientCSV`
(needed to match 19df1eb4ef/notifications_utils/recipients.py (L156) )

The ‘can’t show file contents’ message wasn’t showing up, now it is.
2016-10-17 10:20:14 +01:00
Chris Hill-Scott
a32dcbf8e3 Error if a CSV file contains more than 50,000 rows
We want to limit the number of rows someone can have in a job, because
it gets too slow to process the file otherwise.

This should be the first error that a user sees, because we can’t work
out if there are other errors until they’ve got the file down to a
processable size.

This also means adding a message to say that the file can’t be displayed
if it doesn’t contain any processed rows.

***

https://www.pivotaltracker.com/story/show/129830161
2016-10-16 10:55:19 +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