Commit Graph

4627 Commits

Author SHA1 Message Date
Leo Hemsted
18b50ddfde error handlers should not raise. Not even abort(400)s.
Refactor csrf handler into the normal error handler area, and then add
some tests to make sure it does the right thing. Also, change it back
to a 400, because the 403 err page talks about being in the wrong
place, but this is about sending the wrong data through, even though
it's technically a 403. Will need to think about wording but this is a
fine first pass
2017-11-28 12:28:16 +00:00
Athanasios Voutsadakis
c38d10d773 Change the CSRF error from 400 to 403
All 400s are handled by a generic errorhandler which logs them and
converts them to 500.

We don't need to be alerted for CSRF problems.
2017-11-28 11:44:59 +00:00
Richard Chapman
93bb0a6605 Merge pull request #1662 from alphagov/rc-update-template-usage-to-use-new-end-point
Disabled the template_history endpoint
2017-11-27 09:39:07 +00:00
Richard Chapman
629593291c Used url_for and redirect
- url_for instead of constructing the url manually
- Used redirect instead of RequestRedirect to be more consistent with
other code
2017-11-24 16:34:45 +00:00
Leo Hemsted
5c44ba5f19 Merge pull request #1661 from alphagov/alphanumeric-inbound-numbers
update utils to 23.1.0 - to show alphanumeric inbound messages on the…
2017-11-24 15:45:52 +00:00
Richard Chapman
155e432aa6 Disabled the template_history endpoint
- Updated tests and added a new mock_get_monthly_template_usage
- Deleted get_monthly_template_statistics_for_service
- Added new test to test the redirection of the old endpoint
2017-11-24 15:20:40 +00:00
Richard Chapman
1681b17fab Disabled the template_history endpoint
- Removed the code for the template_history endpoint and replaced with a
redirect to the new page so that anyone is forwarded on
- Updated the template to point to the new template_usage page
2017-11-24 14:36:36 +00:00
Leo Hemsted
36b95a740e update utils to 23.1.0 - to show alphanumeric inbound messages on the frontend 2017-11-23 16:40:29 +00:00
Chris Hill-Scott
8c915174a3 Merge pull request #1656 from alphagov/pyup-update-boto3-1.4.7-to-1.4.8
Update boto3 to 1.4.8
2017-11-22 16:52:26 +00:00
Pete Herlihy
3749c733a8 Merge pull request #1659 from alphagov/109-111
109-111 and 46-47
2017-11-22 16:47:10 +00:00
Pete Herlihy
56b1f98d90 Merge pull request #1658 from alphagov/roadmap
Updated the Roadmap
2017-11-22 16:35:47 +00:00
Pete Herlihy
ec2cd75a14 109-111 and 46-47 2017-11-22 16:26:28 +00:00
Pete Herlihy
86d2cb2f4c Updated the Roadmap 2017-11-22 16:19:35 +00:00
Richard Chapman
cce1f1fd73 Merge pull request #1654 from alphagov/rc-update-template-usage-to-use-new-end-point
Updated link to for browsing to financial years
2017-11-22 16:05:19 +00:00
Richard Chapman
9dbb14c9e1 Refactored to be more pythonic
Removed the nested for loops and refactored to be pythonic so it is more
maintainable in future.
2017-11-22 15:50:31 +00:00
Richard Chapman
dd2bd2f80a Removed import
An import was not required so removed it.
2017-11-22 14:38:47 +00:00
Richard Chapman
f97fa2cebc Reused the months array instead of redefining it
Re-organised the code to re-use the months array which also was not
displaying a month where there was no stats. This now gets the months,
enumerates that array updating the templates used when there are stats
items so the users sees each month of the financial year (even if there
are no stats) when there are stats they are displayed.
2017-11-22 10:37:53 +00:00
pyup-bot
975a18db71 Update boto3 from 1.4.7 to 1.4.8 2017-11-22 07:48:29 +00:00
Richard Chapman
5937842ca4 Fixes to the template usage page
- When a year contains no data ensure a default set of months is
returned so that all months can be seen in the UI
- Add the template id so the user can click through to the template
2017-11-21 16:48:37 +00:00
Chris Hill-Scott
e470c90b40 Merge pull request #1655 from alphagov/biglotteryfund
Adding biglotteryfund.org.uk to the allowed domains list
2017-11-21 14:17:04 +00:00
Pete Herlihy
2b8fe86e36 Adding a test for the domain biglotterfund.org.uk 2017-11-21 13:58:49 +00:00
Pete Herlihy
33dc83083e Added big lottery fund to approved domains 2017-11-21 13:57:11 +00:00
Richard Chapman
0d36a0ef16 Updated link to for browsing to financial years
The link which when clicked allows the user to view different financial
years was pointing to the template_activity page. Updated to the link
to point to the new page.
2017-11-21 11:09:35 +00:00
Sakis
44c0be1718 Merge pull request #1643 from alphagov/add_proxy_header_check
Add proxy header check
2017-11-21 10:00:19 +00:00
Athanasios Voutsadakis
0dfd1d61f7 Merge branch 'master' into add_proxy_header_check 2017-11-20 17:41:12 +00:00
Chris Hill-Scott
e4b5dd9799 Merge pull request #1653 from alphagov/fix-page-titles-one-off
Improve page <h1>s in send one off flow
2017-11-20 17:16:33 +00:00
Chris Hill-Scott
5f40eabdf3 Improve page titles later on in the one off flow
Now that the page title for picking a sender/reply to has been improved,
I think these pages are also less clear than they could be.

This commit changes the page titles to (I hope) be clearer about what is
needed from the user on these pages.
2017-11-20 16:54:07 +00:00
Chris Hill-Scott
4a1dad9a66 Hide form legend on choose reply page
The `<h1>` on this page says all the user needs to know. In research
we saw that users didn’t even read the legend, even when prompted to!
2017-11-20 16:53:11 +00:00
Chris Hill-Scott
ecd43cee5e Fix misleading <h1> in one-off flow
Changing the `<h1>` in https://github.com/alphagov/notifications-admin/pull/1638
turned out to be quite confusing. The combination of the word
"recipient" and a selection of email addresses on the page was confusing.

This commit changes the page title to be much more explicit about what
is expected from the page, rather than what is consistent with the text
of the link that the user clicked.
2017-11-20 16:53:00 +00:00
Chris Hill-Scott
4105b6ff55 Fix misleading <h1> in one-off flow
Changing the `<h1>` in https://github.com/alphagov/notifications-admin/pull/1638
turned out to be quite confusing. The combination of the word
"recipient" and a selection of email addresses on the page was confusing.

This commit changes the page title to be much more explicit about what
is expected from the page, rather than what is consistent with the text
of the link that the user clicked.
2017-11-20 16:50:33 +00:00
Athanasios Voutsadakis
ce54467c16 Merge branch 'master' into add_proxy_header_check 2017-11-20 10:31:43 +00:00
Chris Hill-Scott
2bf2b4b460 Merge pull request #1619 from alphagov/remove-references-to-computed-column
Remove references to computed column
2017-11-20 10:27:30 +00:00
Richard Chapman
2ce3cca7a8 Merge pull request #1652 from alphagov/rc-update-template-usage-to-use-new-end-point
Refactor to be more pythonic and convert float to int
2017-11-17 15:01:32 +00:00
Athanasios Voutsadakis
d74b104bfe Bump utils version 2017-11-17 14:43:57 +00:00
Athanasios Voutsadakis
6349312684 Merge branch 'master' into add_proxy_header_check 2017-11-17 14:35:35 +00:00
Richard Chapman
9eb544338d Refactor to be more pythonic and convert float to int
- Implementation wasn't pythonic so updated it to be more inline with the
rest of the code for maintainability.
- The API is return a float in some cases for the month which is causing
the date to string method to fail.
2017-11-17 14:35:25 +00:00
Chris Hill-Scott
832c1cf75f Merge pull request #1634 from alphagov/smaller-font-for-bigger-numbers
Make dashboard totals smaller if numbers are big
2017-11-17 13:29:39 +00:00
Pete Herlihy
0cf152a369 Merge pull request #1651 from alphagov/104-109
104 to 109 and 45-46 orgs
2017-11-17 11:24:46 +00:00
Pete Herlihy
a8b854425a 104 to 109 and 45-46 orgs
Department for Education – Find a Career
Gravesham Borough Council	– Gravesham BC
Crown Commercial Service – CCS Power BI
Department for International Trade – Export Support Alpha
Crown Commercial Service – GCloud Assurance
2017-11-17 10:39:38 +00:00
Richard Chapman
5750a204ab Merge pull request #1650 from alphagov/rc-update-template-usage-to-use-new-end-point
Added new template usage page which will replace template-activity
2017-11-17 09:32:06 +00:00
Richard Chapman
de9548bba2 Only Allow Admins
Changed the decorator to only allow admin users access to the page.
2017-11-17 09:26:03 +00:00
Athanasios Voutsadakis
bde734dc75 Use test_client() as context manager 2017-11-16 17:02:38 +00:00
Richard Chapman
d03df16db5 Added new template usage page which will replace template-activity
The current template-activity page is slow as it is using the end point
which uses notification_history  and hence is timing out. This adds a
new pages (so that they can be compared side by side) which will be
hidden until is is approved with the larger data set and tested.
2017-11-16 16:55:07 +00:00
Chris Hill-Scott
7d1cf2169d Show text message sender in send one-off flow
If you’ve chosen a text message sender then it’s good to see
confirmation of your choice.

This replicates what we do when you choose an email reply-to address.
2017-11-16 16:43:44 +00:00
Athanasios Voutsadakis
3b30895a73 Merge branch 'master' into add_proxy_header_check 2017-11-16 16:35:39 +00:00
Athanasios Voutsadakis
ac3cf15322 Log failed api healthchecks 2017-11-16 16:35:24 +00:00
Athanasios Voutsadakis
8786ce79f4 Use parametrize 2017-11-16 16:34:10 +00:00
Athanasios Voutsadakis
1c78b938b4 Fix tests 2017-11-16 16:33:50 +00:00
Athanasios Voutsadakis
0e9291c9d8 Add CHECK_PROXY_HEADER flag and bump utils 2017-11-16 16:33:21 +00:00
Athanasios Voutsadakis
f8b8cdece7 No need to put the before_request down there 2017-11-16 16:25:40 +00:00