Commit Graph

2225 Commits

Author SHA1 Message Date
Chris Hill-Scott
7d99308d4e Fix Markdown/HTML email oddities
Depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/59
2016-08-01 10:38:34 +01:00
Chris Hill-Scott
a76e3fa31d Merge pull request #812 from alphagov/header-colour-config
Update environment configs to override blue header
2016-07-28 10:35:06 +01:00
Chris Hill-Scott
82107940db Update environment configs to override blue header
Because the header bar now defaults to blue instead of red, live
needs to be explicitly set to have a red header bar.

This also updates the config to staging, which used to inherit from the
preview one (and get an orange header) but now inherits from the base
config, and so needs its header colour setting explicitly as well.
2016-07-28 10:28:51 +01:00
Chris Hill-Scott
898a532d04 Merge pull request #811 from alphagov/beta-banner
Add beta banner to homepage
2016-07-28 10:23:54 +01:00
Chris Hill-Scott
37923b77a9 Only show red strip if logged in
Mainly because the red/beta orange/blue combo looks gross. And also
because you’re not in admin mode until you’re logged in.
2016-07-28 09:13:40 +01:00
Chris Hill-Scott
f22b61b9f4 Add beta banner to homepage
Because the homepage of the app is discoverable to the public, it makes
“gives the wrong impression” for it not to have a beta banner.
2016-07-28 09:08:15 +01:00
minglis
817a52781f Merge pull request #803 from alphagov/remove-stats-from-job-page
Remove stats from job page
2016-07-26 11:24:00 +01:00
minglis
4db855c5b5 Merge pull request #804 from alphagov/too-many-messages
Too many messages
2016-07-26 11:23:55 +01:00
minglis
4c2daddf75 Merge pull request #805 from alphagov/update-util-markdown-branding
Update utils for Markdown parsing + subbranding
2016-07-26 11:23:48 +01:00
Pete Herlihy
8f77f47bb2 Merge pull request #806 from alphagov/whitelist-domain
Added new domain to whitelisted users
2016-07-26 10:56:30 +01:00
Leo Hemsted
86ce23f5da Merge pull request #802 from alphagov/dashboard-stats-untangling
Remove notification-statistics endpoints from totals boxes
2016-07-25 10:29:36 +01:00
Pete Herlihy
cf4c932706 Added new domain to whitelisted users 2016-07-22 11:14:25 +01:00
Chris Hill-Scott
6ce38d5500 Update utils for Markdown parsing + subbranding
Markdown parsing (will be active but isn’t documented):
- [x] https://github.com/alphagov/notifications-utils/pull/54

Email sub branding (not used yet):
- [x] https://github.com/alphagov/notifications-utils/pull/55
2016-07-22 10:51:30 +01:00
Leo Hemsted
6ff77c995e add tests for service_api_client 2016-07-21 17:32:28 +01:00
Leo Hemsted
d6e6d05893 add tests for send check error messages 2016-07-21 15:39:00 +01:00
Leo Hemsted
afce715a3d fix issues with too many messages partial not branching correctly
branch for "has service sent anything today" was around the intial
paragraph, rather than around the "you can still send..." bit -
they should always see the first paragraph, especially the bit that
points out if they're in trial mode. They don't need to see how
many messages they have remaining today if it's the same amount as
their daily limit.
2016-07-21 15:03:49 +01:00
Leo Hemsted
20eb08a122 move too many messages error to its own partial 2016-07-21 15:03:32 +01:00
Leo Hemsted
eab66dc6be add tests for get_status_filters 2016-07-20 16:18:04 +01:00
Leo Hemsted
57e03349d2 remove get_statistics_for_service from statistics_api_client 2016-07-20 15:54:30 +01:00
Leo Hemsted
ee10b3a6c2 use detailed service endpoint in notification summary page
to help get rid of notification statistics tables, move over the
job page. fortunately its required data format is almost identical
to the return value of the detailed service endpoint, so little
work is required - only to add a sending column
2016-07-20 15:52:35 +01:00
Leo Hemsted
0cc2a90a1a add tests for get_dashboard_totals 2016-07-20 14:12:22 +01:00
Leo Hemsted
fade656e3b add new get_detailed_service mock to tests that the dashboard 2016-07-20 14:12:22 +01:00
Leo Hemsted
3ffd6c744c separate detailed and normal service_api_client.get_service
to make it easier to mock and control return values
2016-07-20 14:12:22 +01:00
Leo Hemsted
3e6eedd079 use new detailed service endpoint for dashboard totals
we don't want to use the old statistics endpoints any more
also a couple of quality of life changes
* moves some logic out of the _totals.html template
* tidies up statistics_utils
2016-07-20 14:12:22 +01:00
Leo Hemsted
4451a8634d add detailed flag to GET service api client
returns current (past 7 days) notification stats as well as service info
2016-07-20 14:12:22 +01:00
Chris Hill-Scott
d9944107da Merge pull request #799 from dahfool/master
replace require with es6 import statment
2016-07-20 12:01:17 +01:00
Chris Hill-Scott
8d7c37886c Merge pull request #795 from alphagov/delivery-info-specific-time
Make ‘Available for…’ text on job page relative
2016-07-20 12:01:06 +01:00
Chris Hill-Scott
f6bdef4ca3 Add tests for time_left
This commit extracts the code that works out the ‘Data available for…’
message so that it’s easy to unit test for.
2016-07-20 11:50:22 +01:00
Chris Hill-Scott
9a5fbca707 Make ‘Available for…’ text on job page relative
When we say ‘delivery information is available for 7 days’ you have to
infer _when_ the seven days starts. When you come back to the page it
still says ‘available for 7 days’ even if you only have a day left to
download it. This is confusing.

This commit changes the text to be relative to now, eg ‘available for 7
days’, ‘available for 1 day’.

The date is counted to midnight on the seventh day, which is when the
data is actually deleted.
2016-07-19 15:25:17 +01:00
Gerald Isabelle
2440e5ed9a replace require with es6 import statment 2016-07-19 15:13:23 +01:00
Leo Hemsted
743a9d05d1 Merge pull request #794 from alphagov/refactior
Rename api_client to service_api_client
2016-07-19 13:26:34 +01:00
Chris Hill-Scott
b378e8aebd Merge pull request #796 from alphagov/hide-csv-on-dashboard-again
Really hide the ‘download CSV’ link in the tour
2016-07-19 13:20:50 +01:00
Chris Hill-Scott
52d5841bbe Reduce indentation by combining with statements 2016-07-19 12:47:16 +01:00
Chris Hill-Scott
86a4daa4e8 Don’t pass entire job thru to notifications page
It only needs the `id`, and it only needs that to generate the download
URL, so let’s just pass the URL through instead.
2016-07-19 12:47:06 +01:00
Chris Hill-Scott
55902d2927 Add a test for the ‘available for 7 days’ text
So that we can check it’s still correct when we make it dynamic.
2016-07-19 12:46:45 +01:00
Chris Hill-Scott
cfadead292 Make it clearer what you’re downloading
The previous text didn’t make it clear _what_ you were downloading as a
CSV file, you had to infer it from the context.

And the fact that it’s a CSV file is immaterial, it’s the data you care
about, not the format.
2016-07-19 12:46:20 +01:00
Chris Hill-Scott
83c1035f1b Really hide the ‘download CSV’ link in the tour
Tried to do this in
https://github.com/alphagov/notifications-admin/pull/743

Didn’t account for it reappearing when the AJAX fired, because the AJAX
request didn’t account for whether or not the user was in the tour.
2016-07-19 09:32:41 +01:00
Chris Hill-Scott
500a503f07 Rewrite job page test to use Beautiful Soup
Beautiful Soup makes it easier to do assertions on specific pieces of
text. The diffs are more useful than when you do `if 'text' in page`.
2016-07-18 09:07:02 +01:00
Leo Hemsted
5bd90bba64 make test folder structure align with app folder structure 2016-07-15 15:23:40 +01:00
Leo Hemsted
1cd2841c17 rename api_client to service_api_client 2016-07-15 15:23:23 +01:00
Chris Hill-Scott
6d5561267b Merge pull request #792 from alphagov/upgrade-utils-bleach-fix
Upgrade utils to fix bleach version issue
2016-07-15 13:47:36 +01:00
Chris Hill-Scott
93f7390f65 Upgrade utils to fix bleach version issue
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/53
2016-07-15 13:42:43 +01:00
Chris Hill-Scott
1c8c86bd1c Merge pull request #781 from alphagov/template-previews
Adds previews of email templates
2016-07-15 10:35:15 +01:00
Adam Shimali
8f7eaa784b Merge pull request #787 from alphagov/message-limit-increase-fix
Increase daily message limit for unrestricted services
2016-07-14 13:36:51 +01:00
Adam Shimali
22601ab4f6 Increase daily message limit for unrestricted services.
This pr is for:

https://www.pivotaltracker.com/story/show/126230157
2016-07-14 11:38:54 +01:00
Chris Hill-Scott
4dcd8906c8 Merge pull request #784 from alphagov/wonky-tables
Fix wonky tables on dashboard and activity page
2016-07-14 09:16:16 +01:00
Chris Hill-Scott
9c83d559f3 Fix wonky tables on dashboard and activity page
Tables with a `layout` of `fixed` determine column widths from the
width of the column headings.

We weren’t setting the width of the first column heading, so our tables
were getting out of alignment.
2016-07-13 16:56:28 +01:00
Chris Hill-Scott
1f90a7eee0 Show full email template on single template page
There’s no point in collapsing […] the email on the single template
page because it’s the only thing on the page.

Users will probably be going back and forth quite a bit to edit their
template and see the changes; they shouldn’t have to expanded it evey
time to check they’ve got the heading syntax right, for example.
2016-07-13 08:55:59 +01:00
Chris Hill-Scott
c006b8748c Add conditional placeholder detection
Implements: https://github.com/alphagov/notifications-utils/pull/51

Copies the same regex.

Adds some CSS to display conditional placeholders differently to
normal placeholders (vertical rather that curved right-hand edge).
2016-07-12 17:11:52 +01:00
Chris Hill-Scott
d380eaf060 Allow images to be served from live domain
Currently images in our email template are hardcoded to be served from
the live domain[1].

In order for the admin app, running locally or in preview/staging, to be
able to load these images when previewing an email template, the CSP
headers need to allow this domain.

Also splits the header string up using string literal concatenation[2]
so that it’s easier to read.

1. https://notifications.service.gov.uk
2. https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
2016-07-12 16:46:46 +01:00