Commit Graph

482 Commits

Author SHA1 Message Date
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
Chris Hill-Scott
352750dcf6 Merge pull request #470 from alphagov/better-better-send-page
Make the flow of using templates better
2016-04-19 15:54:47 +01:00
Chris Hill-Scott
27ad1532e4 Make the flow of using templates better
For users who:
- want to send messages from a template
- want to edit templates

For developers:
- who need to get the ID of a template

This commit mainly cleans up the choose template page so there are less
options, and the options that are there are less wordy.

This means:
- moving ‘send yourself a test’ onto the send messages page, and making
  it button
- stripping a lot of stuff out of the ‘send from API’ page, so it’s more
  obvious what the template ID is
2016-04-19 15:31:19 +01:00
Nicholas Staples
f3210ea992 Functionality added to download all on activity page. All tests passing. 2016-04-19 11:45:36 +01:00
Chris Hill-Scott
b75ab7c3df Make new service current service on first use
When you add a new service, it’s probably the one you want to do stuff
with.

When you get invited, the service you’ve been invited to is probably the
one you want to use.

This commit adds the ID of the new service or service you’ve been
invited to to the session.
2016-04-19 11:04:00 +01:00
Chris Hill-Scott
37f341e757 Make tour work for non-logged-in users
There’s no content in the tour that’s specific to a service. And since
we can now take a pretty good guess at what service you last used, or
which service we should send you to if you only have one service,
there’s no need to make the URLs for the tour service-specific.

This also means that you don’t need to be logged in to see the tour
pages, and we have no good reason to only restrict these pages to users
with accounts.

https://www.pivotaltracker.com/story/show/116960703
2016-04-19 10:38:16 +01:00
Chris Hill-Scott
a0e3a648f3 Fix innacurate error message on CSV check
We only know if a row contains missing cell(s), not how many cells are
missing data.

This commit changes the error message to be more accurate.
2016-04-18 11:47:53 +01:00
Nicholas Staples
2085792742 Add created_by to all appropriate requests. 2016-04-15 11:08:19 +01:00
Nicholas Staples
6d9de1a500 Make service live and revert working, all tests passing. 2016-04-14 15:38:34 +01:00
Nicholas Staples
a6a42d6f26 Fixed bug for subject not updating when changed on the edit template page. 2016-04-14 14:08:35 +01:00
Nicholas Staples
3865c722fc Updated notifications_utils version and associated code. Added email subject formatting for placeholders. 2016-04-14 12:00:55 +01:00
Chris Hill-Scott
2a03cd3952 Merge pull request #431 from alphagov/sort-template-stats
Sort template stats by usage
2016-04-13 16:15:33 +01:00
Nicholas Staples
a6d1c5b693 Download CSV option now available.
App is updated to use the rebased db.
2016-04-12 15:38:02 +01:00
Chris Hill-Scott
4568c0e5ab Sort template stats by usage
Template stats should show the most-used template first.

This commit:
- re-writes the `aggregate_usage` function to use `itertools.groupby`,
  which can do aggregation, and can return data in a structure that’s
  easy to sort on
- uses generators so that we’re not keeping lots of rows of template
  stats in memory

https://www.pivotaltracker.com/story/show/117348893
2016-04-12 12:03:52 +01:00
Chris Hill-Scott
42a6e801e4 Merge pull request #426 from alphagov/reword-recent-templates
Reword ‘recent templates’ section of dashboard
2016-04-12 10:06:27 +01:00