Commit Graph

496 Commits

Author SHA1 Message Date
NIcholas Staples
bd0afce745 Merge pull request #527 from alphagov/windows_csv
Only check on csv is the file extension.
2016-05-03 12:50:34 +01:00
Chris Hill-Scott
1d0b28f156 Merge pull request #524 from alphagov/usage
Add usage to the dashboard
2016-05-03 11:35:11 +01:00
Chris Hill-Scott
00030bc254 Add usage to the dashboard
Takes the number of emails and SMS fragments sent from:
https://github.com/alphagov/notifications-api/pull/273

Using these numbers it’s possible to show:
- how much of your allowance is left
- or how much you have spent

For now the allowance and rates are hard coded.

Only for users that have manage service.
2016-05-03 11:06:12 +01:00
NIcholas Staples
9e94d2382d Merge pull request #532 from alphagov/british_time
Times from api are now formatted to the british time.
2016-05-03 11:02:21 +01:00
Chris Hill-Scott
f6ba5ec8d0 Merge pull request #528 from alphagov/activity-improvements
Link up the last 7 days
2016-05-03 10:58:51 +01:00
Nicholas Staples
e1f3975c9a Times from api are now formatted to the british time. 2016-05-03 10:55:37 +01:00
Nicholas Staples
f581ff44d0 Only check on csv is the file extension.
Update validator logic

Update message for the validator.
2016-05-03 10:10:58 +01:00
Chris Hill-Scott
d82569f883 Fix page titles on activity page
We were getting some weirdness like ‘Failed both’.

This commit fixes the problem, and adds some tests for the page headings
to make sure they don’t break again.
2016-04-29 16:03:56 +01:00
Chris Hill-Scott
e6ed2c9ff6 Remove bumf from the API keys page 2016-04-29 14:36:56 +01:00
NIcholas Staples
96297d2989 Merge pull request #522 from alphagov/sms_msg_limit
Sms msg limit
2016-04-29 12:29:45 +01:00
Nicholas Staples
471eac209e Handling template content size error. All tests passing. 2016-04-29 09:38:59 +01:00
Andrew White
8995a86bb6 Merge pull request #520 from alphagov/redirect-to-dashboard-when-existing-service
Redirect to dashboard if this isn't the first service
2016-04-28 17:23:14 +01:00
Andrew White
7812b1cef5 Redirect to dashboard if this isn't the first service
There's no need to show the tour again if the user has previously
created a service so just redirect to the dashboard instead.
2016-04-28 16:44:12 +01:00
Adam Shimali
a627cf9002 Change activity to view to request 7 days data.
Cleaned up filters a bit so that if you want both templates
email and sms is passed.

Added mock assertion to test.
2016-04-28 15:52:20 +01:00
Adam Shimali
7c1867fde6 Record login including remembered user login events to the api based of flask login
signals.
2016-04-27 16:39:17 +01:00
Chris Hill-Scott
a65466327c Put environment URL in feedback tickets
So that:
- we know what environment a request has been sent from
2016-04-26 16:46:00 +01:00
Chris Hill-Scott
456291d630 Put URL to service in request to go live ticket
So that:
- we know what environment the request has come from
- a platform admin user can jump straight to that service to check it
  out
2016-04-26 16:28:16 +01:00
Chris Hill-Scott
45241d6232 Put a form on the request to go live page
This commit:
- moves things around a bit on the request to go live page
- sticks a textbox in there

So when someone click the big green button, we will get a support ticket
that looks something like:
```
From Test User <test@user.gov.uk> on behalf of Test Service
(6ce466d0-fd6a-11e5-82f5-e0accb9d11a6)

---

We’ll send about 1000 text messages in the first month, and then 10,000
text messages per month after that. Usage of our service is about 50%
higher in March, at the end of the tax year.
```
2016-04-26 14:45:50 +01:00
Chris Hill-Scott
22fe164711 Move feedback endpoints into own file
Doesn’t make sense to shove more stuff into index.py
2016-04-26 14:45:31 +01:00
Rebecca Law
69f5068587 Merge pull request #507 from alphagov/fix-anchor-tag-in-flash
Fix anchor tag in flash message.
2016-04-26 14:31:45 +01:00
Nicholas Staples
b131082f41 Updated to include corrected flash message. 2016-04-26 12:26:41 +01:00
Rebecca Law
a183d8d366 Missed the anchor tag in the mark up - oops. 2016-04-26 12:15:25 +01:00
Nicholas Staples
9225c0813c Updated msg for the failed login. 2016-04-26 12:14:06 +01:00
Rebecca Law
60c55ca9e2 Fix anchor tag in flash message.
https://www.pivotaltracker.com/story/show/117513779
2016-04-26 12:03:35 +01:00
Nicholas Staples
3122500ce0 Failed login count set to zero with password reset. 2016-04-26 11:51:34 +01:00
Chris Hill-Scott
6107d24af7 Merge pull request #488 from alphagov/daily-limit-message
Show error if you try to send too many messages
2016-04-25 15:35:06 +01:00
Chris Hill-Scott
dd15e69f48 Merge pull request #492 from alphagov/better-two-factor-page
Reword two factor page to match email confirmation page
2016-04-25 15:33:59 +01:00
Chris Hill-Scott
77885295f9 Merge pull request #494 from alphagov/click-govuk-not-logged-in
If not logged in, go to homepage when clicking GOV.UK
2016-04-25 15:33:36 +01:00
Chris Hill-Scott
bc58aec0db Merge pull request #499 from alphagov/dashboard-duration
Fix the big numbers on the dashboard
2016-04-25 15:32:54 +01:00
Chris Hill-Scott
b5ed12421a Merge pull request #497 from alphagov/api-keys-page-improvements
API keys page improvements
2016-04-25 11:39:49 +01:00
Chris Hill-Scott
96cc03dc9e Merge pull request #490 from alphagov/contact-link-signup
Updated the contact us link for non gov.uk domains trying to register.
2016-04-25 11:38:30 +01:00
Chris Hill-Scott
0cc499bce4 Make sure the stats client passes params through
This was the cause of the dashboard showing statistics from all time.
2016-04-25 11:30:09 +01:00
Chris Hill-Scott
d0c4509761 Fix missing request context in validators tests 2016-04-25 11:20:43 +01:00
Chris Hill-Scott
71035ab96e Use the same pattern as elsewhere for ‘new thing’
On the team and templates pages we have a pattern for adding a new
‘thing’, which is a green button in the top right.

This commit changes the API key page to follow the same pattern.
2016-04-25 10:52:07 +01:00
Chris Hill-Scott
a6be0d0612 Show error if you try to send too many messages
https://www.pivotaltracker.com/story/show/117630691

There is a limit of 50 messages per day in trial mode. Right now, we
don’t tell you this, we just start failing your messages.

This commit adds an error message if you upload a CSV file that has too
many rows in it.
2016-04-25 10:46:38 +01:00
Chris Hill-Scott
41fa6c61ee Add test for redirecting to service in session
If you click GOV.UK and have:
- multiple services
- a service in your session

…we take you to the dashboard for that service. This worked great, but
wasn’t tested. This commit adds a test for it.
2016-04-24 09:51:06 +01:00
Chris Hill-Scott
ba7d9cd486 If not logged in, go home when clicking GOV.UK
It’s a bit of a weird experience to be taken to the sign in screen when
you click GOV.UK in the header. It’s doubly weird if you take the tour
before creating an account, and at the end of the tour you get prompted
to sign in.

This commit adds some extra logic to take you to the homepage instead,
which I think is more what you’d expect.
2016-04-24 09:48:13 +01:00
Chris Hill-Scott
c551fd43e0 Reword 2FA page to match email confirmation 2016-04-23 16:24:48 +01:00
Rebecca Law
9ae6e18ad2 Fix unit tests, change agent_team_id to department_id 2016-04-22 16:28:33 +01:00
Rebecca Law
49db4e85ad Merge pull request #482 from alphagov/update-requirements
Update requirements
2016-04-21 10:28:45 +01:00
Rebecca Law
2afbbd6423 Removed unused requirements and modules. 2016-04-21 09:11:00 +01:00
Chris Hill-Scott
0080bce562 Say ‘sent’ rather than ‘processed’
Hopefully users understand that sent != delivered
2016-04-20 15:32:02 +01:00
Chris Hill-Scott
09491e880e Show template usage for all time on it’s own page
> We show the last weeks template usage on the dashboard, which is
> great, but if you're looking for longer term trends, you're out of
> luck...

> So, let's let you see more on a more detailed page (linked from the
> dashboard). Initially this should just show you all templates that you
> have used ever and the count for each. Order same as dashboard, most
> popular first.

https://www.pivotaltracker.com/story/show/117614585
2016-04-20 15:31:42 +01:00
Chris Hill-Scott
312a903e65 Limit templates usage on dashboard to last 7 days
Previous the table of templates on the dashboard was for all time.
This commit uses the `limit_days` parameter of the API endpoint to only
show template usage from the last 7 days, aligning with the big numbers
shown above.
2016-04-20 15:02:29 +01:00
NIcholas Staples
4f71c40735 Merge pull request #466 from alphagov/desktop_feedback
Feedback page added. All tests working.
2016-04-20 11:17:55 +01:00
Chris Hill-Scott
8d6eb0985b Merge pull request #471 from alphagov/craig-david
Show the last 7 days of statistics on the dashboard
2016-04-20 11:13:51 +01:00
Nicholas Staples
da536bbd2e Feedback page working with all tests passing.
Updated to include team id.

Give Feedback -> Give feedback
2016-04-20 10:17:09 +01:00
Chris Hill-Scott
be7c7cebbc Limit big numbers to the last 7 days
Implements and depends on:
- https://github.com/alphagov/notifications-api/pull/241
2016-04-19 17:10:39 +01:00
Chris Hill-Scott
5bf0d8fe70 Show all statistics fetched on the dashboard
We want to align all our stats to be for the last 7 days.

This means summing up the stats response from the API to make the Big
Number. Previously the big number was counting sent notifications as
successful. This commit changes it to only look at delivered
notifications.

Right now, the API doesn’t have a way of filtering to only show the last
7 days. So for the moment the dashboard will show statistics for all
time.

The upshot of this is that we can link from the dashboard to the
activity page when there are failures.
2016-04-19 15:57:53 +01:00
Chris Hill-Scott
9b75f7ef8a Merge pull request #467 from alphagov/tour-footer-link
Put a link to the tour in the footer
2016-04-19 15:55:47 +01:00