Commit Graph

150 Commits

Author SHA1 Message Date
Kenneth Kehl
1308894191 cleanup 2024-09-03 14:01:17 -07:00
Kenneth Kehl
35dcfccd5f fix tests maybe 2024-09-03 11:03:33 -07:00
Kenneth Kehl
ddf9c6d3ec fix tests maybe 2024-09-03 10:37:05 -07:00
Kenneth Kehl
ce74175be1 clean up 2024-09-02 08:34:15 -07:00
Kenneth Kehl
f74bf271a5 clean up 2024-09-02 08:22:03 -07:00
Kenneth Kehl
e8b12de581 clean up 2024-09-02 08:13:05 -07:00
Kenneth Kehl
dcc8055377 more work on load test 2024-09-02 07:51:57 -07:00
Kenneth Kehl
c36561ee4d start load test work 2024-08-30 09:50:01 -07:00
Kenneth Kehl
bda957f76a change delimiter back to comma 2024-08-12 07:27:32 -07:00
Kenneth Kehl
38a6c35afd add test 2024-08-08 13:11:58 -07:00
Kenneth Kehl
ee1dcdeb03 strip commas from fields 2024-08-08 13:02:51 -07:00
Kenneth Kehl
1a75e56187 code review feedback 2024-08-08 10:59:57 -07:00
Kenneth Kehl
69e9c6d1ca code review changes 2024-08-08 10:47:18 -07:00
Kenneth Kehl
2497679046 switch commas to tabs 2024-08-07 07:21:53 -07:00
Kenneth Kehl
323ecf63f4 remove unused import 2024-08-06 12:27:42 -07:00
Kenneth Kehl
7b03d02447 add front end for download all users 2024-08-06 11:31:05 -07:00
Kenneth Kehl
96ec868e3e fix service stats 2024-04-10 07:45:10 -07:00
stvnrlly
f600dd95d6 remove email branding 2023-12-18 16:10:12 -05:00
Kenneth Kehl
31fb43e45c notify-admin-487 platform admin view errors 2023-11-14 10:39:24 -08:00
Kenneth Kehl
8c9721d8e2 notify-api-412 use black to enforce python coding style 2023-08-25 09:12:23 -07:00
Kenneth Kehl
dc342385ce notify-admin-641 let platform admins export listing of all users (#647)
Co-authored-by: Kenneth Kehl <@kkehl@flexion.us>
Co-authored-by: stvnrlly <steven.reilly@gsa.gov>
2023-07-26 12:08:55 -04:00
Steven Reilly
13d0e46b52 blunt rename of org (#620) 2023-07-12 12:09:44 -04:00
stvnrlly
59d4f09d01 a few more organisation edits 2023-01-05 21:33:15 -05:00
stvnrlly
944715ac46 big commit with letters removal 2022-12-05 15:33:44 -05:00
stvnrlly
f16b5dd1c4 remove broadcast-related code 2022-10-04 03:04:13 +00:00
jimmoffet
68e6efdad0 remove redis debug config var 2022-09-08 09:07:54 -07:00
jimmoffet
dad051a662 2767 passing 2022-08-05 00:25:03 -07:00
James Moffet
4c25a81004 disable cache until we can fix on cloud deployment 2022-07-26 11:17:43 -07:00
Leo Hemsted
b3f5bb6435 add new daily sms provider volumes report
nearly identical to the daily-volumes-report but sms only, and split up
by provider
2022-04-11 14:40:31 +01:00
Ben Thorner
d1d3a6a6c3 Merge pull request #4182 from alphagov/refactor-email-branding-181415991
First set of refactorings for branding
2022-03-22 13:43:10 +00:00
Ben Thorner
f02c2b0b1d Rename other "Admin" forms consistently
I've also tweaked some of the names to make them clearer e.g. that
the form is used to apply a change to a service.

I've constrained the scope of this change to avoid forms that may
be accessible by non-admins in the future.
2022-03-15 11:47:22 +00:00
Rebecca Law
de46fb6477 Merge pull request #4183 from alphagov/volume_reports
Report for total notifications sent per day for each channel.
2022-03-09 15:15:03 +00:00
Rebecca Law
c6e67d1690 Fix column names
Add unit test
2022-03-09 15:02:52 +00:00
Rebecca Law
971cb745c9 Report for total notifications sent per day for each channel.
Daily volumes report: total volumes across the platform aggregated by whole business day (bst_date)
Volumes by service report: total volumes per service aggregated by the date range given.

NB: start and end dates are inclusive
2022-03-07 14:30:11 +00:00
Ben Thorner
81d9c73543 Bump -utils to 55.0.0
This renames "delete_cache_keys_by_pattern" to match the new method
name, which will also catch exceptions if Redis is down [1].

Note that this also includes a change to RecipientCSV [2], which has
no effect because the new default is the same as the old behaviour.

[1]: https://github.com/alphagov/notifications-utils/pull/949
[2]: https://github.com/alphagov/notifications-utils/pull/947/files#diff-a8a994bf655634f89dc7439880708b4ff0d780ac1bd8033827d8aaa2692a8e0fR373
2022-03-07 13:53:57 +00:00
Ben Thorner
ebbfd20472 Make it easy to clear cache for all key formats
Having to submit the form for each choice separately slowed us down
during an incident where Redis was unavailable and came back with
stale data, which we had to clear manually.

Note: we don't want to use the "flush" feature in case there are other
keys in Redis, which may not be safe to remove.
2022-02-21 15:09:03 +00:00
Ben Thorner
8396412ce1 Report all cache keys that were deleted
This will make it easier to add another test / feature to clear all
the cache keys. It's debatable which of "sum" and "max" is useful:

- "max" is a better (although still not accurate) indicator of the
number of "things" affected e.g. templates, services, etc.

- "sum" makes sense in places where "max" doesn't e.g. when we clear
the "organisations" group, which doesn't equate to individual orgs.

Using "sum() ... across" seems like a reasonable compromise and makes
it clear that we're iterating over different kinds of keys.

While the pluralisation is nice, I don't think it's worth the effort
to make it work for both "object(s)" and "format(s)".
2022-02-21 14:11:49 +00:00
Pea Tyczynska
9862acd7ee Hint that report is inclusive of both start date and end date
Bu changing labels for date input fields.
2022-02-01 16:48:05 +00:00
Pea Tyczynska
feb2657040 Change formatting for guidance from list to table. Also rewrite
some of the guidance following content review.

Co-authored-by: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2022-02-01 16:47:38 +00:00
Pea Tyczynska
f1d5c33fda Rename sms_fragments to sms_chargeable_units
This field caused some confusion and lots of unnecessary work
to our colleague because of unclear name.

The field was named sms_fragments, where in fact the value of
the field is: those sms fragments that go above free allowance
multiplied by the rate multiplier.

The new name was chosen through consultation with colleagues
who use billing report the most.
2022-01-18 18:05:07 +00:00
Chris Hill-Scott
50eae6f935 Stop using platform_admin_client fixture
We have a `client_request` fixture which does a bunch of useful stuff
like:
- checking the status code of the response
- returning a `BeautifulSoup` object

For most tests of a platform admin view we used `platform_admin_client`
instead. This is not as good because it returns a raw `Response` object
and doesn’t do the additional checks.

This commit converts all the tests using `platform_admin_client` to:
use new `client_request` and log in as `platform_admin_user` before
making any requests.

This is also nice because it makes any test easy to parametrize with
additional users, for example to test differences in behaviour dependant
on being platform admin or not.
2022-01-10 14:39:40 +00:00
Katie Smith
1862cd0223 Update data format for platform admin report
The format of dates returned from API for the "Monthly notification
statuses for live services" report has changed, so we no longer need to
format the dates here.

https://github.com/alphagov/notifications-api/pull/3279
2021-06-23 16:14:58 +01:00
Ben Thorner
edb0b8214d Move pagination utils into own module
This continues the pattern established in [1], just to chip away a
bit more at the random collection of stuff in utils/__init__.py.

[1]: https://github.com/alphagov/notifications-admin/pull/3923
2021-06-14 11:00:05 +01:00
Ben Thorner
44cf2b16b5 Merge pull request #3923 from alphagov/refactor-email-verify
Split out utils code into separate modules
2021-06-14 10:28:28 +01:00
Katie Smith
c1bfc280b7 Add total_letters to the billing report
This adds an extra column to the report that can be downloaded from
`platform-admin/reports/usage-for-all-services`.
2021-06-11 11:08:33 +01:00
Ben Thorner
0326005aeb Extract template / csv utility code into modules
This follows a similar approach to the previous commits, noting that
one module depends on the other, so we have to extract both together.
2021-06-09 15:19:00 +01:00
Ben Thorner
7c27646d6a Extract user utility code into own module
This provides more room for expansion, and reduces the amount of
arbitrary code in the __init__.py file for the new package.
2021-06-09 13:19:05 +01:00
Pea Tyczynska
f7142a1518 Catch validation error from API
When dates chosen for billing report are not in the same
financial year, API throws an error. This error was not being
caught so far. This PR starts to catch it and display a banner
with error message on the page, instead of page crashing.
2021-03-30 14:13:57 +01:00
Pea Tyczynska
38cfee6390 Rename usage report to billing report
Because only services with bills to pay are included, and
we started including billing details.

Also rename endpoints and file names to match this.
2021-03-30 14:13:54 +01:00
Pea Tyczynska
95f46ced8a Add billing details fields to Usage for all services report 2021-03-30 14:11:42 +01:00