Commit Graph

8928 Commits

Author SHA1 Message Date
Chris Hill-Scott
d2f976c8ee Don’t show progress once notifications are gone
We work out how complete a job’s processing is by looking at how many
notifications have been created.

Later, we deleted all the notifications, according to the data retention
schedule. This makes it look like the job has gone back to 0% processed.

This commit accounts for this by not showing the % complete message once
a finished job has had its notifications deleted.
2020-01-03 15:12:45 +00:00
Chris Hill-Scott
e3b1813ed7 Add a test for the no notifications message
This wasn’t tested before.
2020-01-03 15:12:28 +00:00
Chris Hill-Scott
d11305741f Merge pull request #3237 from alphagov/returned-pdf-letters
Handle precompiled letters in returned letters list
2020-01-03 10:04:17 +00:00
Tom Byers
54a5f1d22c Merge pull request #3181 from alphagov/update-footer-links
Update footer links
2020-01-02 15:15:37 +00:00
Chris Hill-Scott
5ea02119f4 Handle precompiled via in returned letters list
Precompiled letters sent via the API don’t have:
- a template
- a filename

Which means in the list of returned letters we just show ‘None’. This
commit changes this to ‘Provided as PDF’, which is how we talk about
precompiled letters elsewhere (for example in the template statistics on
the dashboard).
2020-01-02 11:30:51 +00:00
Chris Hill-Scott
f0fe532b46 Pass uploaded file name into test data 2020-01-02 11:29:01 +00:00
Chris Hill-Scott
d3dd6a31e3 Merge pull request #3236 from alphagov/returned-letters-tweaks
Returned letters tweaks
2020-01-02 10:22:51 +00:00
Chris Hill-Scott
07f2ffca25 Add govuk-link class
So it’s one less link we have to do when moving to Design System.

Co-Authored-By: Tom Byers <tombaromba@gmail.com>
2020-01-02 10:08:18 +00:00
Chris Hill-Scott
317aa53b6a Don’t specify that routes are GET only
> By default a route only answers to `GET` requests

https://flask.palletsprojects.com/en/1.1.x/quickstart/#http-methods
2019-12-31 14:49:51 +00:00
Chris Hill-Scott
7059e475c1 Make URLs consistent/hackable
We do `/things` and `/things/<thing_id>` elsewhere; let’s be consistent
here.

Means you don’t have to remember the word ‘summary’.
2019-12-31 14:44:15 +00:00
Chris Hill-Scott
227fca6263 Make appearance of ‘empty’ table rows even
Our table rows take up 65px vertical space.

We also have things that look like rows that say:
- there are no rows
- there are more rows than can be shown on screen

This commit makes them appear the same height.
2019-12-31 14:40:17 +00:00
Chris Hill-Scott
3b7dc05dd6 Add a page for each report
It’s useful to get some kind of preview of the report before you
download it.

And if there’s only a few letters in there then you might not even need
to download it at all.

For teams with lots of letters we don’t want the page to load too slowly
so let’s cap the number of displayed items to 50, same as previewing
a spreadsheet.
2019-12-31 14:39:12 +00:00
Chris Hill-Scott
9c3315f194 Add field headings to table
Headings are good for accessibility. They also are what adds the grey
border to the top of the first row in the table.
2019-12-31 14:38:32 +00:00
Chris Hill-Scott
57ca75f5bc Add download attribute to link
This forces the file to download, rather than open in the user’s
browser. We do this in other places where we let people download CSV and
PDF files.
2019-12-31 14:37:50 +00:00
Chris Hill-Scott
8bcfb2fcde Use file list pattern for list of files
This means the page has the same appearance as other lists of stuff like
the notifications page.
2019-12-31 14:37:19 +00:00
Chris Hill-Scott
fae18f3008 Put CSV extension on filename
This follows our pattern for other downloadable reports, and gives
people who know/care about stuff like file types some indication of what
they’re about to download.
2019-12-31 14:36:38 +00:00
Tom Byers
59e40d4c3c Make dashboard test more specific
It was picking up the 'Get started' text from the
new link in the footer.
2019-12-31 10:29:56 +00:00
Tom Byers
0375af3441 Revert "Turn off 'Get started' link when signed out"
This reverts commit 6b27a9e7a3.
2019-12-31 10:02:45 +00:00
Tom Byers
f7d115d0de Revert "Remove signed_out template variable"
This reverts commit 8a59743746.
2019-12-31 10:02:13 +00:00
Rebecca Law
dcc42c5446 Merge pull request #3233 from alphagov/returned-letters
Returned letters
2019-12-31 09:30:01 +00:00
Rebecca Law
5320c3b34b Add class to anchor tag 2019-12-31 09:11:07 +00:00
Rebecca Law
03fe7674bf Add a url_converter to check the date format. 2019-12-30 16:53:32 +00:00
Tom Byers
8a59743746 Remove signed_out template variable
Turns out there's no need for it:

https://github.com/alphagov/notifications-admin/pull/3181#discussion_r362020673
2019-12-30 16:27:15 +00:00
Tom Byers
6b27a9e7a3 Turn off 'Get started' link when signed out 2019-12-30 15:15:02 +00:00
Tom Byers
aa2c095704 Update link to support 2019-12-30 14:31:36 +00:00
Tom Byers
8291378ee2 Reduce size of footer column headings 2019-12-30 14:30:21 +00:00
Tom Byers
62fbc07bff Use --end class for header nav
Uses `govuk-header__navigation--end` class which
does away with the need for a custom override.

Based on suggestion by @quis:

https://github.com/alphagov/notifications-admin/pull/3181#discussion_r361977771
2019-12-30 14:26:48 +00:00
Tom Byers
4ca2e06e6c Remove redundant custom footer component
Now the footer links have headings we don't need
this.
2019-12-30 14:20:46 +00:00
Tom Byers
d0fa640642 Update footer links to include new categories 2019-12-30 14:20:46 +00:00
Rebecca Law
41be4c054b Add test for url and pluralisation 2019-12-30 14:06:15 +00:00
Rebecca Law
401828d1e0 Remove POST where not needed.
Use  plural method to display letter or letters
Remove unused params from list_table method.
2019-12-30 08:39:39 +00:00
David McDonald
d73c3a68f9 Merge pull request #3234 from alphagov/pip-accel
Pip accel
2019-12-27 14:08:23 +00:00
Rebecca Law
a4fed667e4 Updated to reflect change in API key in json result. 2019-12-27 12:40:12 +00:00
David McDonald
224db44a9e Remove coveralls
We aren't using it
2019-12-24 15:25:34 +00:00
David McDonald
ecac52a155 Remove venv creating in makefile
Let's developer create their own virtualenvs using virtualenvwrapper as
they already do.
2019-12-24 15:24:07 +00:00
David McDonald
74b46782ff Remove pip-accel
Not sure how much benefit we are getting from this. Pip-accel has
already not been supported for 3 years now either.
2019-12-24 15:22:42 +00:00
Rebecca Law
4c72efd08a Added tests 2019-12-24 14:33:52 +00:00
Rebecca Law
0273eea0cc Add email address and uploaded_letter 2019-12-24 11:22:12 +00:00
Rebecca Law
729281532d Added returned-letter-summary page.
This page displays a list of available reports, a report is a set of returned lettters that have been reported on the same day.
Each line of the page is a link that can download the report.

I'm not sure the format of the csv is right. The data might be confusing especially if the service has a mix of precompiled templates and jobs.
Units tests are still to come.
2019-12-24 08:44:56 +00:00
Rebecca Law
e2d979f199 New pages to show a summary of all the reports the services has for its returned letters 2019-12-24 08:44:56 +00:00
David McDonald
4a17c461e2 Merge pull request #3232 from alphagov/revert-3228-pip-accel
Revert "Remove pip-accel"
2019-12-23 11:57:04 +00:00
David McDonald
8ce1917740 Revert "Remove pip-accel" 2019-12-23 11:49:32 +00:00
David McDonald
b3cf9e301f Merge pull request #3228 from alphagov/pip-accel
Remove pip-accel
2019-12-23 11:41:45 +00:00
Tom Byers
869bd16536 Merge pull request #3225 from alphagov/fix-details
Add GOV.UK Frontend details component - second attempt
2019-12-23 09:47:56 +00:00
David McDonald
807c83c656 Remove coveralls
We don't use it
2019-12-20 16:58:45 +00:00
David McDonald
4c9c98afb4 Remove forcing of venv
Let's developers do this themselves using virtualenvwrapper
2019-12-20 16:57:25 +00:00
Katie Smith
31a23216aa Merge pull request #3231 from alphagov/pytest-5
More Pytest 5 fixes
2019-12-20 16:56:28 +00:00
Rebecca Law
b6b4e34ecc Merge pull request #3230 from alphagov/remove-analytics
Remove analytics
2019-12-20 16:14:23 +00:00
Rebecca Law
e0f9af8107 Update the javascript to work for www, non-www, and localhost 2019-12-20 16:00:23 +00:00
Katie Smith
3e83638193 Stop calling mock_get_notification fixture as a function
Instead of using `mock_get_notification` to create a notification then
mock it in the tests, a new function, `create_notification`, can be used
to create a custom notification to be mocked. Using this in the
`test_notifications.py` file makes it Pytest 5 compatible.
2019-12-20 15:48:25 +00:00