Commit Graph

2957 Commits

Author SHA1 Message Date
bandesz
10950bb8a6 Run on Paas 2017-01-17 11:44:42 +00:00
minglis
7853817f07 Merge pull request #1071 from alphagov/pentester-as-valid-domain
This PR allows the pentesters to operate as part of white listed root…
2017-01-17 09:01:24 +00:00
bandesz
d523ccf0d6 Fix typo: procecces -> processes 2017-01-16 17:51:46 +00:00
Andras Ferencz-Szabo
05d4c0f27d Merge pull request #1072 from alphagov/codedeploy_autoscaling
Add Makefile commands to control autoscaling processes
2017-01-16 17:38:04 +00:00
bandesz
568032bd28 Add Makefile commands to control autoscaling processes 2017-01-16 17:29:35 +00:00
Martyn Inglis
d333e5a8a8 Escape the period 2017-01-16 16:49:50 +00:00
Martyn Inglis
d45484feb5 This PR allows the pentesters to operate as part of white listed root domains. Needed for full app testing. 2017-01-16 14:18:46 +00:00
imdadahad
b5cb34c368 Merge pull request #1070 from alphagov/return-streamed-csv
Fix timeout on download of large CSV reports
2017-01-16 10:34:25 +00:00
Imdad Ahad
e04dd02c14 Fix blank lines issue 2017-01-13 11:45:09 +00:00
Imdad Ahad
50e0227480 Fairly large refactor of tests related to getting/viewing notifications 2017-01-13 11:37:14 +00:00
Imdad Ahad
59c7bc2e6f Refactor get notifications streaming including formatting 2017-01-13 11:35:27 +00:00
Imdad Ahad
d170c97cec Refactor existing tests to expect csv stream with helper method 2017-01-06 17:49:20 +00:00
Imdad Ahad
1036f365fa Refactor generate csv test to expect a stream (generator) 2017-01-06 17:43:46 +00:00
Imdad Ahad
e28d009fa7 Return csv download stream instead of all-in-memory 2017-01-06 17:41:24 +00:00
Chris Hill-Scott
2f9b9f24f5 Merge pull request #1066 from alphagov/folded-letter
Restrict letter previews to their folded height
2017-01-04 16:10:41 +00:00
Chris Hill-Scott
28b18bdac8 Thin the borders around the letter preview
1px borders match the keylines that we use on email template previews.
2017-01-04 15:53:13 +00:00
Chris Hill-Scott
6271b427aa Don’t skew bottom half of letter in folded state
Skewing the letter results in a bunch of slightly-off-vertical diagonal
lines. This is a bit visually jarring when everything else on the page
lines up vertically or horizontally.

This commit makes the bottom half of the letter straight, by offsetting
it instead of transforming it. The ‘fold’ now has depth, so it has to
be drawn in somehow, that’s what the `:before` is doing.
2017-01-04 15:53:13 +00:00
Chris Hill-Scott
83a9d3ad42 Make the letter unfold slightly on hover
This might be taking the skeumorphism too far (especially with the
animation). But it’s a way of indicating that the letter will ‘unfold’
if you click it. Might revert this, but let’s see how it feels.
2017-01-04 15:53:12 +00:00
Chris Hill-Scott
6f7255d842 Draw the folded half of the letter with CSS
Users might wonder why they can’t see the whole letter. We should make
it obvious that it’s because the letter is folded. We can use CSS to
draw the bottom half of the page behind the top half. With some
transforms this makes it look like the letter is actually folded.

It’s a bit skeumorphic but:
- I think it achives the desired effect
- the way we show emails and text messages is also mildly skeuomorphic
2017-01-04 15:53:12 +00:00
Chris Hill-Scott
a5ddf93287 Restrict letter previews to their folded height
The letter previews take up too much space on the page (more than a
typical email or text message). This means that users have to scroll too
much.

When we send the real letters they will be folded in half to fit in the
envelope.

So by showing the letter previews on the page cropped to half the
letter’s height:
- it reduces the need for scrolling
- it gives an accurate preview of how the letter will be delivered

This is acheived without hard-coding any heights by using a little-known
quirk of CSS, namely that padding set as a percentage is calculated from
the width of the element, even for top/bottom padding. This means that
we can always set the ratio of the displayed letter to be A4 folded in
half – the square root of 2.
2017-01-04 15:53:12 +00:00
Chris Hill-Scott
32d7c79226 Merge pull request #1063 from alphagov/letter-preview-with-placeholders
Add remaining endpoints for PDFs and PNGs
2017-01-04 15:52:46 +00:00
Chris Hill-Scott
729568d010 Improve image quality of PNGs
The PNGs we were generating looked a bit fuzzy, and the text rendering
was a bit off.

This is because we weren’t rendering them at a high enough resolution.
I’m guessing the default was 72dpi. This commit increases the resolution
to 96dpi, which (locally) seems to be enough to give a good-looking
preview.
2017-01-04 15:46:00 +00:00
Chris Hill-Scott
2854dbe3dd Refactor PNG generating endpoint for code reuse
The way we generate PNGs is the same for all the different endpoints,
so the code to do this should be shared.
2017-01-04 15:45:59 +00:00
Chris Hill-Scott
559433c5d2 Add remaining endpoints for PDFs and PNGs
Right now we can show what a letter template looks like as a PDF or PNG.

This commit completes the work so this is also possible when:

- showing a template with the placeholders replaced
- showing any version of a template

Also removes dependency on `Exception().message`, which was deprecated
in Python 2.6. See
97f82d565f
for full details.
2017-01-04 15:45:59 +00:00
Chris Hill-Scott
a159f351a8 Split endpoints that use templates
We’ll need to reuse the logic for viewing images and PDFs of templates,
so let’s have it in a shared method which the HTML endpoint then calls.
2017-01-04 15:45:58 +00:00
Rebecca Law
ea73936f0b Merge pull request #1067 from alphagov/add-date-range-filter-to-platform-admin
Add date range filter to platform admin
2017-01-04 14:21:16 +00:00
Rebecca Law
8b89b7f911 Remove print statements. 2017-01-04 13:02:01 +00:00
Rebecca Law
21582cadb3 Get the BooleanField working in the form. 2017-01-03 16:14:25 +00:00
Leo Hemsted
511c9fd37e Merge pull request #1068 from alphagov/hmcts
add hmcts.net to email whitelist
2017-01-03 13:07:06 +00:00
Leo Hemsted
f1feaaaccc add hmcts.net to email whitelist
(HM Courts & Tribunals Service)
2017-01-03 12:34:57 +00:00
Rebecca Law
2e69d3c680 Add date filter for platform admin page. 2017-01-03 10:45:06 +00:00
Rebecca Law
5572d0f25f This commit renders the platform admin page with the given start and end date query params.
Need to add a form to the page to take these params.
2016-12-28 15:23:19 +00:00
Rebecca Law
df41da4860 [WIP] Attempt at adding a form to the platform admin page is not working well for me here. But I want to commit it so I can look at it again. 2016-12-28 14:44:53 +00:00
Rebecca Law
cc40f81ded Merge pull request #1065 from alphagov/fix-invitation-bug
Fix edge case bug in the invitation flow
2016-12-22 15:37:05 +00:00
Rebecca Law
d0a5ef0247 Refactored the tests to use the client fixture, saves a couple lines of code per test. 2016-12-22 15:24:23 +00:00
Rebecca Law
7b54e0c463 After investigating a 500 in the admin app, I found an edge case in the invitation registration flow that can cause an error.
The flow is as follows:
If the invited user clicks on the /invitation/<token> link in the email (now on /register-from-invite),
then goes to another browser and registers for Notify.
Coming back to the other browser, submit the form for /register-from-invite.

This PR fixes that bug and adds a couple tests for register_from_invite
2016-12-22 11:43:11 +00:00
Chris Hill-Scott
01b9aad0fb Merge pull request #1064 from alphagov/ship-it
Update count of services
2016-12-21 09:55:59 +00:00
Chris Hill-Scott
8c86c269f0 Update count of services 2016-12-21 09:55:35 +00:00
Chris Hill-Scott
0a6351ed83 Merge pull request #1062 from alphagov/fork-weasyprint
Update patched Weasyprint fork to alphagov hosted
2016-12-21 09:38:48 +00:00
Chris Hill-Scott
f64cc1cdfb Merge pull request #1061 from alphagov/remove-nl2br
Remove nl2br Jinja filter
2016-12-21 09:38:42 +00:00
Chris Hill-Scott
9df5f4d172 Merge pull request #1059 from alphagov/outline-hmg-logo
Outline text in HM Government logo
2016-12-21 09:38:33 +00:00
Chris Hill-Scott
8bf8319396 Merge pull request #1058 from alphagov/fitness
Update number of services/departments
2016-12-21 09:38:28 +00:00
Chris Hill-Scott
b99279afad Add link to Bleach bugtracker
Explains why we’re using forked version of Weasyprint
2016-12-20 13:43:53 +00:00
Chris Hill-Scott
f5f3d8acae Update patched Weasyprint fork to alphagov hosted
Better than it being on my personal Github account.
2016-12-20 13:17:01 +00:00
Chris Hill-Scott
810b613bc2 Remove nl2br Jinja filter
This was used when the code for previewing SMS templates lived in the
admin. ⌘F seems to suggest it’s not used anywhere else.
2016-12-20 11:10:38 +00:00
bandesz
57493aff51 Fix apt proxy and curl proxy in Docker 2016-12-20 11:04:29 +00:00
Chris Hill-Scott
69d986ddfa Outline text in HM Government logo
Non-outlined text requires the correct font to be installed to display
properly.

Outlined text is the shapes of the letters converted to vector, so it
doesn’t need any font installed to display.

Since we don’t have the right fonts installed on the boxes yet, this
will make things look better.
2016-12-19 14:47:48 +00:00
Chris Hill-Scott
dfcf2c85c9 Update number of services/departments 2016-12-19 14:12:44 +00:00
Chris Hill-Scott
5411fc4c7f Merge pull request #1057 from alphagov/pricing-on-product
Show pricing and number of services on product page
2016-12-19 12:49:30 +00:00
Chris Hill-Scott
ed1b7aad07 Add number of services to product page
One of the user needs that we identified is not wanting to be the first
to use it. It feels like a much less risky choice if there are already
other people in government using it.

The easiest way to communicate this is with counts of how many services.
The count of departments is good because it shows breadth, where the
count of services shows depth.

Hard coded for now because we have no automatic way of splitting our
test services from real live services.
2016-12-19 12:40:57 +00:00