Commit Graph

7170 Commits

Author SHA1 Message Date
Leo Hemsted
6d27d568fe Merge pull request #865 from alphagov/remove-noti-stats
remove unused call to notification statistics
2016-08-11 17:32:07 +01:00
Chris Hill-Scott
955566b127 Don’t allow changing service users on update 2016-08-11 17:10:10 +01:00
Chris Hill-Scott
da1fa2e61c Make _attach_current_user a pure function
Mutating dictionaries is gross and doesn’t work as you’d expect. Better
to have the function return a new dictionary instead.

Means we can be explicit that `created_by` is one of the allowed params
when updating a service.
2016-08-11 17:07:55 +01:00
Chris Hill-Scott
0cfe10639a Only allow update service to modify named attrs
To prevent typos and inadvertently updating something we shouldn’t,
this adds some filtering to the update_service method to make sure it
is only allowed to update certain attributes of a service.
2016-08-11 17:07:43 +01:00
Chris Hill-Scott
002b58a062 Make service API client do partial updates
The service API client was updating every attribute of a service. Which,
while kinda clunky, is fine…

…until something calling it doesn’t pass in every attribute of the
current service. It was then defaulting optional parameters to `None`.
Which resulted in a bug whereby every time a service was set to live,
its `reply_to_address` and `sms_sender_name` got overwritten to be
empty.

This commit changes the `update` method to only require the service ID,
and pass whatever other named arguments it received straight through to
the API. The API handles partial updates just fine (I think).
2016-08-11 17:07:33 +01:00
Chris Hill-Scott
a809ef59fb Merge pull request #861 from alphagov/trial-mode-api-keys
Talk about trial mode on API keys page
2016-08-11 16:44:16 +01:00
Chris Hill-Scott
497a9548e3 Merge pull request #859 from alphagov/point-documentation-at-clients
Link to client documentation, not API documentation
2016-08-11 16:44:14 +01:00
Leo Hemsted
6fc474a37f remove unused call to notification statistics 2016-08-11 12:07:50 +01:00
Chris Hill-Scott
e82cb21ecc Talk about trial mode on API keys page
When you make a ‘normal’ API key it won’t work as described until your
serivce is live.

We should make this clear at the point at which you choose this key.
2016-08-10 17:04:22 +01:00
Leo Hemsted
4417fa1af7 Merge pull request #809 from alphagov/remove-stats-from-send
don't hit statistics endpoints from send
2016-08-10 16:11:50 +01:00
Leo Hemsted
f642d6a6f1 rename test variables for clarity 2016-08-10 15:55:13 +01:00
Leo Hemsted
e94a00850a remove unused file 2016-08-10 15:40:41 +01:00
Chris Hill-Scott
3b2406ba02 Rename documentation to API documentation
Everything in this column of the footer is specifically to do with
the API now.
2016-08-10 10:36:08 +01:00
Chris Hill-Scott
bf6c3bfcc2 Move terms of use into help
Terms of use is non-technical, it should sit alongside the other
non-technical things like pricing.
2016-08-10 10:35:37 +01:00
Chris Hill-Scott
7010e35256 Remove example personalisation from template page
This was of dubious value, and the syntax probably isn’t accurate for
all languages.
2016-08-10 10:31:21 +01:00
Chris Hill-Scott
44a0845882 Replace documentation link with links to clients
In research we found that developers orientate themselves around the
API clients rather than the documentation.

We should get them to the client documentation as quickly as possible.

We currently link to the API documentation in three places:
- API integration page
- global footer
- template ‘API info’ page

For the first two this commit:
- removes the link to the documentation
- adds links to each of the 5 clients

For the last one it just removes the link entirely.
2016-08-10 10:31:10 +01:00
Leo Hemsted
3f3463b1ff Merge branch 'master' into remove-stats-from-send 2016-08-09 14:41:00 +01:00
Chris Hill-Scott
981777a72a Merge pull request #853 from alphagov/quis-patch-1
Delete spacer.png
2016-08-09 13:48:59 +01:00
Leo Hemsted
f2b6bfbfc2 Merge pull request #815 from alphagov/weekly-refactor
Weekly stats aggregate page refactor
2016-08-09 09:37:50 +01:00
Chris Hill-Scott
bc0c620fa1 Delete spacer.png
Depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/63
- [ ] https://github.com/alphagov/notifications-api/pull/587

The utils fix needs to be deployed to live on the API before this can be merged/deployed
2016-08-08 12:00:00 +01:00
Leo Hemsted
cd48f2c31a Merge pull request #851 from alphagov/add-spacer
Add spacer image for email template
2016-08-08 11:34:34 +01:00
Leo Hemsted
f46d10b401 Merge pull request #844 from alphagov/deskpro-user-email
Fix deskpro user email
2016-08-08 11:32:13 +01:00
Chris Hill-Scott
aed10f711c Add spacer image for email template
Forgot to include this before.

The template expects it in `./images` but it should probably live in
`./images/email-template`.

This commit puts it in both places; we can clean up later.
2016-08-08 11:12:01 +01:00
Chris Hill-Scott
d0ac61403a Merge pull request #837 from alphagov/add-crests
Add department crests for email sub branding
2016-08-08 10:27:30 +01:00
Chris Hill-Scott
955b99b0e2 Merge pull request #847 from alphagov/make-total-default-on-job
Make ‘total’ the default status on a job
2016-08-05 14:48:06 +01:00
Chris Hill-Scott
8c92737282 Make ‘total’ the default status on a job
The blue bar on the job page works out which is the current status from
the query parameters, not the parameters that the API gets called with.
2016-08-05 13:42:24 +01:00
Chris Hill-Scott
e482404eea Merge pull request #832 from alphagov/make-numbers-less-confusing
Make numbers on a job less confusing
2016-08-05 12:14:29 +01:00
Chris Hill-Scott
040af920e9 Merge pull request #827 from alphagov/move-guidance-underneath
Move guidance underneath
2016-08-05 12:14:17 +01:00
Chris Hill-Scott
2d4bff646c Merge pull request #845 from alphagov/explicit-about-sending-example-to-yourself
Make it clear who you’re sending the example to
2016-08-05 12:14:09 +01:00
Chris Hill-Scott
652534533b Rewrite prev/next test to use BeautifulSoup 2016-08-05 11:33:32 +01:00
Chris Hill-Scott
b85b929b11 Lose the confusing list slicing
Slicing was to avoid duplicate items in the list. A more idomatic way
to avoid duplicate items in a list is to use a `set` instead.

The order of the list doesn’t really matter, but it’s a lot easier to
test for if the order is consistent.
2016-08-05 11:16:34 +01:00
Chris Hill-Scott
01bb2ada0a Don’t let _set_status_filters mutate original list
Mutating stuff is scary and prone to problems. Better for it to
return a new list instead.
2016-08-05 11:02:30 +01:00
Chris Hill-Scott
d0ef913520 Add a message if there are more than 50 rows
Similar to how we do it on the check page, we should indicate if there
are more results than we can show. No-one’s really complained about the
absence of this, but it can’t hurt.
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
9e6111fd00 Make ‘download’ wording consistent
We changed this on the jobs page in
9a5fbca707

Missed doing it on the notifications page.
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
940815b33c Tighten up spacing around download link 2016-08-05 10:59:49 +01:00
Chris Hill-Scott
e621dddd6d Don’t show the download until the job is complete
The CSV report isn’t very useful until it has all the rows from your
original file. So we shouldn’t show you the link until all notifications
have been created.

Until this point, it’s useful to know how much longer you need to wait,
so this commit adds a percentage count of how much of the file has been
processed.
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
45ae43d987 Include ‘created’ in ‘sending’ bucket
The difference between created and sending isn’t something a user should
have to care about. So this commit:
- counts created and sending as the same thing
- displays and notifications which have a status of created as sending
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
51a4ab8060 Change ‘processed’ to ‘total’
Processed is not an easy to understand thing, and the overlap with
sending/delivered/failed is not easy to intuit.

‘Total’ is a much easier concept to grasp (it relates directly to your
file), and it’s less distracting because it doesn’t change.
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
3fcfdc1bce Make sending count down from total rows
It’s weird when the sending number ramps up to ~200 or so and then
just floats around as new rows are being added and older ones are being
marked as delivered/failed.

It’s also not great that you don’t know how many rows are in a file, if
you haven’t uploaded it yourself. But the only reason you want to know
this is to know how much work Notify has remaining to do.

So ‘sending’ should start from the total number of rows in the file
and count down.
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
47e7d418eb Remove redundant if statement
We check for the `None` case in the parent `if` statement.
2016-08-05 10:59:49 +01:00
Chris Hill-Scott
0e2d80018e Fix page title 2016-08-05 09:40:21 +01:00
Chris Hill-Scott
99ec0fd8d7 Make it clear who you’re sending the example to
It’s not one of your colleagues. You’re not inviting someone. We’ve seen
people get confused about this.
2016-08-05 09:32:58 +01:00
Leo Hemsted
d5238bce5b handle if user doesn't provide name/email
also clean up usage of DESKPRO_PERSON_EMAIL and put it in the conf rather than env
2016-08-04 18:01:08 +01:00
Leo Hemsted
ff46aaa6cc send user contact info to deskpro correctly
previously we were erroneously setting our own reply email rather
than using the user's provided one 😵
2016-08-04 17:02:21 +01:00
Chris Hill-Scott
1ea1b1fd45 Merge pull request #841 from alphagov/revert-833-js-memory-speedup
Revert "Stop AJAX updater consuming ever-increasing memory"
2016-08-04 12:17:39 +01:00
Chris Hill-Scott
b9a69def00 Revert "Stop AJAX updater consuming ever-increasing memory" 2016-08-04 12:06:04 +01:00
Chris Hill-Scott
1e39e54bd6 Merge pull request #838 from alphagov/no-banner-if-api-permission
Don’t show banner on dashboard to API users
2016-08-04 10:35:26 +01:00
Chris Hill-Scott
8cef0bd74e Merge pull request #833 from alphagov/js-memory-speedup
Stop AJAX updater consuming ever-increasing memory
2016-08-04 10:35:19 +01:00
catherineheywood
4b0c5367e6 Change API keys to API integration
Change reference to interface - API keys to  API integration
2016-08-04 09:05:00 +01:00
Chris Hill-Scott
d318a4e8a2 Don’t show banner on dashboard to API users
The "you only have permission to view this service" banner sort of
makes sense if you don’t have _any_ permissions, but it doesn’t if you
have permission to create API keys. If you can create API keys you can
do a lot more than just view the service.
2016-08-03 16:46:00 +01:00