Commit Graph

2608 Commits

Author SHA1 Message Date
Chris Hill-Scott
f561bfe603 Show expander arrow for all browsers
The polyfill we use for details/summary only renders the arrow if the
browser doesn’t natively support the feature.

The latest versions of Firefox _do_ now support the feature (after 5
years), but for some reason they don’t draw the arrow. So this commit
forces the arrow to be polyfilled in all browsers, and hides the browser
default one, for those browsers that do render it.
2016-10-12 15:55:53 +01:00
Chris Hill-Scott
c13f1aa5d1 Fix API log page in Firefox
The details of each notification were not being hidden on page load in
Firefox.

Firefox does not natively support the `<details>` element, so we
polyfill it.

Because of the way the polyfill is written[1]

1. There can’t be any `<div>` elements inside the `<summary>` (this
   commit changes them to be `<span>`s instead, and adds CSS to make
   sure they wrap as before)
2. The contents to be shown/hidden must be wrapped in a `<div>` (which
   this commit adds)

***

1. 48fde82c72/public/javascripts/govuk/details.polyfill.js (L90)
2016-10-12 15:28:38 +01:00
Chris Hill-Scott
ee8ac59d70 Merge pull request #980 from alphagov/limit-jobs-7-days
Fix all jobs being shown on the dashboard
2016-10-12 13:37:32 +01:00
Chris Hill-Scott
b48874dbad Fix all jobs being shown on the dashboard
The dashboard was showing the 50 most recent jobs, not the 50 most
recent in the last 7 days.
2016-10-12 11:31:59 +01:00
Leo Hemsted
daa848f4c5 Merge pull request #965 from alphagov/paginate-dashboard
Limit jobs on the dashboard
2016-10-11 11:36:22 +01:00
Chris Hill-Scott
00aa9df350 Merge pull request #977 from alphagov/revert-976-revert-969-dont-create-normal-key-trial-mode
Revert "Revert "Don’t let people create a normal key in trial mode""
2016-10-11 11:07:39 +01:00
Chris Hill-Scott
645e935f55 Revert "Revert "Don’t let people create a normal key in trial mode""
Reverts alphagov/notifications-admin#976
2016-10-11 10:42:11 +01:00
Leo Hemsted
8464c67a3d move job statuses to job_api_client
prevent code duplication and a good excuse to use set subtraction
2016-10-11 10:35:33 +01:00
Leo Hemsted
0fdd38b9c5 add tests for new jobs functionality 2016-10-10 17:15:57 +01:00
Chris Hill-Scott
d13dbe5066 Merge pull request #976 from alphagov/revert-969-dont-create-normal-key-trial-mode
Revert "Don’t let people create a normal key in trial mode"
2016-10-10 17:02:54 +01:00
Chris Hill-Scott
8e323a81a8 Revert "Don’t let people create a normal key in trial mode" 2016-10-10 16:50:46 +01:00
Chris Hill-Scott
13227606a9 Merge pull request #973 from alphagov/remove-documentation
Remove documentation pages
2016-10-10 16:01:09 +01:00
Chris Hill-Scott
f854422396 Merge pull request #974 from alphagov/email-regex
notification-utils 9.0.5
2016-10-10 15:59:40 +01:00
Chris Hill-Scott
fb157ec501 Merge pull request #975 from alphagov/capita-whitelist
Added Capita to whitelist as they're running a service for EFA
2016-10-10 15:59:21 +01:00
Chris Hill-Scott
b733feb8c4 Merge pull request #969 from alphagov/dont-create-normal-key-trial-mode
Don’t let people create a normal key in trial mode
2016-10-10 15:59:13 +01:00
Chris Hill-Scott
1fccc524a1 Remove documentation pages
These are out of date now and potentially misleading.

Adds a new error page for HTTP `410 GONE`. Looks like the 404 page, but
returns the appropriate error code to be a good web citizen.
2016-10-10 15:58:11 +01:00
Leo Hemsted
dbe4400441 paginate jobs page
(only views/jobs/jobs.html, which is the drill-down page, not the dashboard view)
2016-10-10 15:43:01 +01:00
Leo Hemsted
ebb590bc5d clean up generate_previous_next_dict
separate it into two functions to avoid repeatedly passing in the same parameters everywhere, and removed some unused if blocks
2016-10-10 15:43:01 +01:00
Leo Hemsted
479623ee99 fix query param testing once and for all. hopefully
try and avoid comparing URLs as much as possible cos its hard
2016-10-10 15:43:01 +01:00
Leo Hemsted
aa458a15da update tests to reflect new code
also change jobs.py to filter out test jobs (since we dont need to see em)
and to use the new statuses filter rather than filtering on front end
2016-10-10 15:43:01 +01:00
Leo Hemsted
441a2717f2 make dashboard jobs list hit job api twice
once for scheduled jobs, once for past jobs

this ensures that if you have lots of scheduled jobs it can still return your last 50 jobs
2016-10-10 15:43:01 +01:00
Leo Hemsted
be97edce7f make add_rate_to_jobs singular
there was no reason for it to operate on a whole list at a time
2016-10-10 15:43:01 +01:00
Leo Hemsted
549a17c1f7 separate get_job and get_jobs in job_api_client
also remove the status parameter, as we never use it anywhere
2016-10-10 15:43:01 +01:00
Pete Herlihy
be9c0fb0c8 Added Capita to whitelist as they're running a service for EFA 2016-10-10 15:12:53 +01:00
Chris Hill-Scott
90d4fcaa52 Don’t let people create a normal key in trial mode
You can’t properly use a normal key when your service is in trial mode.

It’s theoretically useful to create a live key in preparation for going
live. This utitily outweighs the confusion it causes for people creating
their first keys in trial mode.

We should just remove the confusing option.
2016-10-10 14:40:13 +01:00
Leo Hemsted
83015b9efb notification-utils 9.0.5
Uses more restrictive email regex to prevent people adding emails with leading quotes, semicolons, etc, that SES rejects and end up as a Technical Failure
2016-10-10 12:13:56 +01:00
Chris Hill-Scott
5bb700ac81 Merge pull request #970 from alphagov/whitelist-live
Make whitelist available to live services
2016-10-10 11:39:11 +01:00
Chris Hill-Scott
e714f7adff Merge pull request #971 from alphagov/whitelist-flash
Add a flash message when a user saves whitelist
2016-10-10 11:27:39 +01:00
Chris Hill-Scott
d85be4ef13 Merge pull request #972 from alphagov/compress-all-js
Ensure all Javascript is served compressed
2016-10-10 11:20:22 +01:00
Chris Hill-Scott
87fc3a9e16 Ensure all Javascript is served compressed
Previously we were running the minification before adding dependencies.
This meant that dependencies that don’t come with a minified version
were being served in full.

Running Uglify over everything _after_ including the dependencies
reduces the weight of the downloaded Javascript by about 50kb.
2016-10-10 09:35:15 +01:00
Chris Hill-Scott
eab1d134b2 Add a flash message when a user saves whitelist
I saw users in research going back into the whitelist to check that it
had saved because there’s no feedback.

This commit adds a flash message to confirm that the whitelist was saved
OK.
2016-10-07 15:06:47 +01:00
Chris Hill-Scott
73469c1067 Make whitelist available to live services
Why would a live servie need the whitelist? Because the team key will
also let you send to members of your whitelist (so this commit relabels
it to say so).
2016-10-07 15:01:49 +01:00
Chris Hill-Scott
14c9f39342 Merge pull request #967 from alphagov/fix-param-tests
fix query param testing once and for all. hopefully
2016-10-07 13:43:49 +01:00
Leo Hemsted
b01323c28c fix query param testing once and for all. hopefully
try and avoid comparing URLs as much as possible cos its hard
2016-10-07 13:32:47 +01:00
Chris Hill-Scott
1d18afa231 Merge pull request #966 from alphagov/title-dashboard
Removed service name from the title tag on dashboard
2016-10-07 12:27:18 +01:00
Pete Herlihy
0a21d30f4b Removed service name from the title tag on dashboard 2016-10-07 12:20:39 +01:00
Chris Hill-Scott
60ca57f8f8 Merge pull request #964 from alphagov/terms-update
Removed the incorrect bit about not needing an MOU for low volumes.
2016-10-05 16:38:15 +01:00
Pete Herlihy
4632affc3f Removed the incorrect bit about not needing an MOU for low volumes. 2016-10-05 16:35:08 +01:00
Chris Hill-Scott
893a7b839e Merge pull request #963 from alphagov/fix-analytics
Don’t include hostname in page passed to analytics
2016-10-05 16:34:54 +01:00
Chris Hill-Scott
2e82731bf3 Don’t include hostname in page passed to analytics
Analytics only expects to get the path part of the URL, not the full
URL.
2016-10-05 16:31:22 +01:00
Chris Hill-Scott
5267bb3eda Merge pull request #961 from alphagov/add-quarterly-breakdown
Add monthly breakdown of usage
2016-10-05 16:29:39 +01:00
Chris Hill-Scott
860b071f66 Test for query parameters in either order
They’re not deterministic, and were causing intermittant test failures.
2016-10-05 16:13:21 +01:00
Chris Hill-Scott
b760457ba9 Add monthly breakdown of usage
Basically:
- shows all the months from start of given financial year to now or end
  of given financial year (whichever is earliest)
- shows a breakdown of free and paid text messages for each of these
  months

Depends on:
- [x] https://github.com/alphagov/notifications-api/pull/699
2016-10-05 16:11:19 +01:00
Chris Hill-Scott
0a0bfa9232 Merge pull request #962 from alphagov/re-add-analytics
Re-add Google Analytics
2016-10-05 14:49:01 +01:00
Chris Hill-Scott
4ea7d806fb Remove UUIDs from URLs sent to Google Analytics
If all our URLs are unique (because they contain service/job/template
IDs) then it makes it hard to aggrate how users are behaving across a
range of services/jobs/templates.

This commit replaces anything that looks like a UUID in a URL with `…`.
2016-10-05 10:58:33 +01:00
Chris Hill-Scott
e095d6024c Revert "Remove Google Analytics"
This reverts commit f31170f5a2.
2016-10-05 10:55:04 +01:00
Chris Hill-Scott
cf01227790 Merge pull request #960 from alphagov/fix-paging-activity-page
Fix pagination on activity page
2016-10-03 17:09:34 +01:00
Chris Hill-Scott
3069858a9f Fix pagination on activity page
The activity page was AJAXified in
https://github.com/alphagov/notifications-admin/pull/952 but this
didn’t take pagination into account.

So if you visited page 2, the contents of the page would be replaced by
Javascript with the contents of page 1. So you’d never be able to see
anything beyond page 1, expect for a brief fraction of a second when the
page loaded.

This commit makes sure the AJAX request uses whatever page parameter is
in the URL of the original page.
2016-09-30 15:41:46 +01:00
Rebecca Law
2eb7360468 Merge pull request #959 from alphagov/remove-user-from-service
Allow platform admin to edit users.
2016-09-30 14:07:20 +01:00
Chris Hill-Scott
e682f6a5f9 Merge pull request #958 from alphagov/revert-add-analytics
Remove Google Analytics
2016-09-30 13:49:14 +01:00