Commit Graph

708 Commits

Author SHA1 Message Date
Chris Hill-Scott
cd091af9e7 Merge pull request #894 from alphagov/fix-research-mode-toggle
Fix admin app putting service into research mode
2016-08-23 14:27:02 +01:00
Chris Hill-Scott
f8db73ecc7 Reduce uneccessary indentation 2016-08-23 10:21:05 +01:00
Chris Hill-Scott
0f6a090470 Fix admin app putting service into research mode
We changed the `update_service` method to only update indivdual
attributes of a service, and only allow it to update specified
attributes: 0cfe10639a

We neglected to specify `research_mode` as one of the allowed
attributes.

This broke the app’s ability to put a service in or out of research
mode.

This commit:
- makes sure the tests cover this eventuality
- fixes the bug by specifying `research_mode` as one of the allowed
  attributes
2016-08-23 10:16:27 +01:00
Martyn Inglis
49b4387b25 Merge branch 'master' into handle-new-template-stats-endpoint 2016-08-23 09:30:38 +01:00
Martyn Inglis
4dec7a7939 Changed order of templates activity page from alphabetical to desc count. 2016-08-23 09:14:21 +01:00
Martyn Inglis
9fbd410474 Merge branch 'master' into use_new_template_stats_endpoint
Conflicts:
	app/notify_client/template_statistics_api_client.py
2016-08-22 16:47:42 +01:00
Martyn Inglis
c43fde0ac0 For the brief moment when we have incompatible API versions out,
We won't call template stats by template id as the format has changed. So just ask the question "do you want to delete" without the context.
2016-08-22 16:35:14 +01:00
Chris Hill-Scott
1e254415d2 Text message not Sms 2016-08-22 13:30:03 +01:00
Martyn Inglis
63fa77fde7 Admin app now in line with new API response for template statistics
- dropped the day level aggregate. Now grouped by template only,
2016-08-22 13:14:35 +01:00
Martyn Inglis
4cab7ffb3c Merge branch 'master' into use_new_template_stats_endpoint 2016-08-22 12:55:11 +01:00
Martyn Inglis
5666719a92 Merge branch 'master' into more_wording_changes
Conflicts:
	app/templates/views/verify-mobile.html
2016-08-22 12:54:10 +01:00
Martyn Inglis
380a6526c4 Changed some more instances of "confirmation" code to "security" code 2016-08-22 12:52:05 +01:00
Chris Hill-Scott
aa166856b4 Change 'verification code' to 'security code'
Extensive testing on Verify has shown that this is understood better.
2016-08-22 11:46:07 +01:00
Martyn Inglis
55c4443a05 Admin app uses the new API response formats. 2016-08-18 15:30:57 +01:00
Leo Hemsted
bfcf4be447 separate branding/org test into two tests
it's a bit more legible and the running time of these tests is
negligable so split up the test into its two logical components
2016-08-16 14:46:59 +01:00
Leo Hemsted
fde8d81868 send organisation back in correct variable 2016-08-15 11:15:49 +01:00
Chris Hill-Scott
6b5e64479a Add a page to set organisation and branding option
Platform admin only.

Adds radio buttons to choose one of:
- three hard-coded branding options
- organisations from a list provided by the API
2016-08-12 10:31:43 +01:00
Leo Hemsted
20c39d24b7 Merge pull request #863 from alphagov/allow-partial-service-updates
Allow partial service updates from service API client
2016-08-12 10:07:55 +01:00
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
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
f642d6a6f1 rename test variables for clarity 2016-08-10 15:55:13 +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
Leo Hemsted
f2b6bfbfc2 Merge pull request #815 from alphagov/weekly-refactor
Weekly stats aggregate page refactor
2016-08-09 09:37:50 +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
652534533b Rewrite prev/next test to use BeautifulSoup 2016-08-05 11:33:32 +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
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
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
e2875ea66e Merge branch 'master' into remove-stats-from-send 2016-07-29 11:08:42 +01:00
Leo Hemsted
a7c8e88ecb add tests and remove old aggregate code 2016-07-28 18:09:17 +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
Leo Hemsted
eaf9b6dc54 pass 'today_only' flag to the back-end from send page
also bump notification-utils requirement to 8.7.0 for changes
to RecipientCSV
2016-07-25 15:26:43 +01:00
Leo Hemsted
45debe0d5b remove get_statistics_for_service_for_day from codebase
two down, three to go
2016-07-25 14:54:58 +01:00
Leo Hemsted
0accd88869 request stats for today from send page from GET /service/:id endpoint
also amended test cases to ensure they mock out correct call
2016-07-25 14:46:27 +01:00
Leo Hemsted
aa37dc4929 add tests for send check error messages 2016-07-25 10:41:50 +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
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