Commit Graph

5779 Commits

Author SHA1 Message Date
Chris Hill-Scott
9d2e0ae2f3 Merge pull request #2191 from alphagov/json-boolean
Store boolean values in Redis as valid JSON
2018-07-31 12:24:38 +01:00
Chris Hill-Scott
45579c59cd Store boolean values in Redis as valid JSON
Calling `.set()` with `True` stores the byte string `'True'` which
cannot subsequently be decoded from JSON (because boolean values in
JSON are lowercase, ie `true`).
2018-07-31 12:17:28 +01:00
Chris Hill-Scott
1073b8f178 Merge pull request #2178 from alphagov/cache-has-jobs
Check if any jobs exist before querying jobs
2018-07-31 11:17:42 +01:00
Alexey Bezhan
5af1183218 Merge pull request #2153 from alphagov/pin-all-requirements
Pin all requirements in requirements.txt
2018-07-31 10:25:04 +01:00
Chris Hill-Scott
0906eb019d Check that API is not called when result is cached
Good to explicitly test this (rather than relying on an exception not
being raised).
2018-07-31 10:05:10 +01:00
Chris Hill-Scott
eb8e433820 Rename variable to be more descriptive
> "normal" is a word that does not really tell much, could we maybe name
> this constant better?

‘Non-scheduled’ more explicitly describes that statues in this set.
2018-07-31 09:57:55 +01:00
Chris Hill-Scott
1af288fc1c Merge pull request #2189 from alphagov/pyup-update-pytest-3.6.4-to-3.7.0
Update pytest to 3.7.0
2018-07-31 09:56:52 +01:00
pyup-bot
369ad2b457 Update pytest from 3.6.4 to 3.7.0 2018-07-31 02:16:50 +01:00
Alexey Bezhan
5bae92c738 Make pyup ignore requirements.txt
We don't want pyup.io upgrading sub-dependencies listed in the
requirements.txt file since it does it whenever a new version is
available regardless of what our application dependencies require.
2018-07-30 16:43:44 +01:00
Alexey Bezhan
2f876243ae Pin all requirements in requirements.txt
The list of top-level dependencies is moved to requirements-app.txt,
which is used by `make freeze-requirements` to generate the full
list of requirements in requirements.txt.

(See alphagov/notifications-api#1938 for details.)
2018-07-30 16:43:03 +01:00
Chris Hill-Scott
3056731cbb Merge pull request #2174 from alphagov/copy-template
Add option to copy existing template when adding
2018-07-30 13:02:46 +01:00
Chris Hill-Scott
2070314cb1 Fix missing organisation services from user search
The list of services this page was looking at only included those not
belonging to an organisation.

On production this excludes services we’ve added to organisations to
make the management of those services easier (eg ‘GDS’ and ‘DVLA’).
2018-07-30 11:31:52 +01:00
Chris Hill-Scott
19632ea4ab Add option to copy existing template when adding
Sometimes when setting up a service you might have a few very similar
templates, in which only a small amount of content. Or you might even
have a few of services, which are used by different teams but have
similar templates.

Copy and pasting, especially from one service to another, is a pain.
This commit makes it easier by allowing users to copy an existing
template when choosing to add a new one, instead of starting from
scratch.
2018-07-30 11:31:51 +01:00
Chris Hill-Scott
078096eecc Merge pull request #2183 from alphagov/pyup-update-notifications-python-client-4.8.2-to-4.10.0
Update notifications-python-client to 4.10.0
2018-07-30 11:31:21 +01:00
Chris Hill-Scott
9490c791dd Merge pull request #2187 from alphagov/pyup-update-beautifulsoup4-4.6.0-to-4.6.1
Update beautifulsoup4 to 4.6.1
2018-07-30 11:31:09 +01:00
Chris Hill-Scott
505de52d38 Check if any jobs exist before querying jobs
At the moment the dashboard does two API calls to find out if a service
has:

1. Scheduled jobs
2. Normal jobs

API calls are slow because they are synchronous, go over the network and
touch the database. We can’t cache these API calls because:
- a scheduled job could become a normal job at any time
- the statistics on a normal job are constantly updating

However there are plenty of services which don’t have any jobs, and
probably never will. And finding out if a service has any jobs is
reliably cacheable (because as soon as a service creates its first job
it has some jobs).

So this commit:
- refactors the way we get scheduled/normal jobs into the job_api_client
  to make the view a bit slimmer
- makes an additional, Redis-wrapped call to find out if any jobs exist
  before trying to get the jobs

This should result in a speedup on the dashboard, and can be used in the
future if there’s anywhere else we want to show or hide something
depending on whether a service has created any jobs (I have some ideas).
2018-07-30 11:14:01 +01:00
Chris Hill-Scott
c1b2f63671 Merge pull request #2173 from alphagov/gamblingcommission.gov.uk
Mark agreement signed by the Gambling Commission
2018-07-30 10:44:38 +01:00
Chris Hill-Scott
bbf710c0a6 Merge pull request #2185 from alphagov/pyup-update-pytest-xdist-1.22.2-to-1.22.5
Update pytest-xdist to 1.22.5
2018-07-30 10:38:36 +01:00
Chris Hill-Scott
0d1fcb2018 Merge pull request #2186 from alphagov/pyup-update-pytest-3.6.3-to-3.6.4
Update pytest to 3.6.4
2018-07-30 10:38:22 +01:00
pyup-bot
b278382d92 Update beautifulsoup4 from 4.6.0 to 4.6.1 2018-07-29 00:49:48 +01:00
pyup-bot
7f82cc9fbb Update pytest from 3.6.3 to 3.6.4 2018-07-28 18:15:46 +01:00
pyup-bot
9c2bca8b82 Update pytest-xdist from 1.22.2 to 1.22.5 2018-07-28 14:03:45 +01:00
Pea (Malgorzata Tyczynska)
3bbbbc41d3 Merge pull request #2182 from alphagov/remove_monthly_billing
Remove view displaying data form monthly_billing table
2018-07-25 14:20:03 +01:00
Pea Tyczynska
6d2aad5561 Remove functions and comments redundant after monthly_billing removal 2018-07-25 11:48:17 +01:00
pyup-bot
65159ff23b Update notifications-python-client from 4.8.2 to 4.10.0 2018-07-24 15:43:37 +01:00
Pea Tyczynska
72e8303987 Remove view displaying data form monthly_billing table 2018-07-24 14:32:33 +01:00
Chris Hill-Scott
7d535544db Merge pull request #2164 from alphagov/rename-basic-nav
Improve navigation in basic view
2018-07-20 14:54:15 +01:00
Chris Hill-Scott
49dff1f5fe Merge pull request #2176 from alphagov/woking
Added Woking to the signed contracts list
2018-07-20 14:54:06 +01:00
Chris Hill-Scott
5909d0be84 Merge pull request #2179 from alphagov/308-and-101
Updated the service and org counts
2018-07-20 14:53:59 +01:00
Pete Herlihy
eee9059fd7 Updated the service and org counts 2018-07-20 13:59:11 +01:00
Pete Herlihy
6fbb376df0 Adding Cheshire East to the domains with contracts 2018-07-20 10:25:20 +01:00
Chris Hill-Scott
2fdf38d0db Use canonical domain name 2018-07-20 10:23:18 +01:00
Pete Herlihy
538aa1bc10 Added Woking to the signed contracts list 2018-07-19 16:44:57 +01:00
Chris Hill-Scott
dc6993d000 Mark agreement signed by the Gambling Commission 2018-07-19 10:21:46 +01:00
Katie Smith
6f5ffa2d7c Merge pull request #2172 from alphagov/add-one-off-flag
Ensure one-off jobs do not appear on message log page
2018-07-18 16:22:40 +01:00
Katie Smith
eb9e9fac3b Ensure one-off jobs do not appear on message log page
Upcoming changes to API will mean that by default its
`get_notifications_for_service` DAO function will return one-off
notifications. In most cases this is what we want, but the message log
page should not show one-off notifications. By passing in the `include_one_off=False`
option to API we can ensure that this page will stay the same when API
changes.
2018-07-18 08:11:42 +01:00
Chris Hill-Scott
a11e0e332c Merge pull request #2170 from alphagov/mismathc
Fix mismatch version numbers
2018-07-17 11:59:26 +01:00
Chris Hill-Scott
48d45119eb Merge pull request #2168 from alphagov/croydon.gov.uk
Add Croydon council to list of domains
2018-07-17 11:59:17 +01:00
Chris Hill-Scott
534567a27b Fix mismatch version numbers
Forgot to update both…
2018-07-17 11:50:58 +01:00
Chris Hill-Scott
b33e08b3db mark agreement as signed 2018-07-17 11:47:12 +01:00
Chris Hill-Scott
a6fe161c8a Add Croydon council to list of domains 2018-07-17 11:45:36 +01:00
Chris Hill-Scott
b8fbc1cf93 Merge pull request #2169 from alphagov/quis-patch-1
Bump utils to fix smart quotes in email addresses
2018-07-17 11:45:11 +01:00
Chris Hill-Scott
57bccc0314 Use debian jessie instead of stretch until npm is installed differently 2018-07-17 11:37:29 +01:00
Chris Hill-Scott
fbc7960ebe Bump utils to fix smart quotes in email addresses
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/500
2018-07-17 11:22:29 +01:00
Pea (Malgorzata Tyczynska)
7f73fb0c27 Merge pull request #2167 from alphagov/fix_services_finding_user_info
Fix displaying of services on User Information page
2018-07-16 17:48:43 +01:00
Pea Tyczynska
2fab363253 Link to user services on User Information page 2018-07-16 17:37:26 +01:00
Pea Tyczynska
b3d99507bd Fix displaying of services on User Information page 2018-07-16 17:37:26 +01:00
Katie Smith
48c5a24020 Merge pull request #2165 from alphagov/sepa.org.uk
Add Scottish Environmental Protection Agency
2018-07-16 16:31:16 +01:00
Chris Hill-Scott
1d5de9bd7d Add Scottish Environmental Protection Agency
They are a (Scottish) government organisation.

https://www.sepa.org.uk/
2018-07-16 16:18:37 +01:00
Pea (Malgorzata Tyczynska)
d76f30e9f8 Merge pull request #2158 from alphagov/admin_platform_users_search
Admin can find users by email and see information about them
2018-07-16 16:11:36 +01:00