Commit Graph

30 Commits

Author SHA1 Message Date
Martyn Inglis
146772f22e Sort platform admin page by requested messages.
- puts services that are doing things at the top.
2017-04-25 12:54:58 +01:00
Chris Hill-Scott
fb33255bd0 Show a more useful message if you get signed out
> Users that allow their session to expire, or access a bookmarked link
> are told they need to "Sign in to access this page" - we should
> explain that it's because they've been away a while, so that they
> understand why they're being asked to log in again.

– https://www.pivotaltracker.com/story/show/140016919

The message we were showing before (Please log in to access this page is
the default message from Flask Login).

In order to stop this flash message from appearing, we need to override
the default handler for when a user is unauthorised. We’re overriding it
with the same behaviour, minus the flash message.

If you navigate deliberately to the sign in page it’s unchanged.

Content is Sheryll-approved.
2017-02-16 13:33:32 +00:00
Chris Hill-Scott
f3b0c0a556 Use client and logged_in_client fixtures
Wherever possible, because Don’t Repeat Yourself.
2017-02-06 10:44:38 +00:00
Chris Hill-Scott
929dc45224 Normalize whitespace in test arguments
We have a bunch of different styles of handling when function
definitions span multiple lines, which they almost always do with tests.

Here’s why an argument per line, single indent is best:
- cleaner diffs when you change the name of a method (one line change
  instead of multiple lines)
- works better on narrow screens, eg Github’s diff view, or with two
  terminals side by side on a laptop screen
- works with any editor’s indenting shortcuts, no need for an IDE

Also, trailing comma in the list of arguments is good because adding a
new argument to a method becomes a one line, not two line diff.
2017-02-06 10:44:37 +00:00
Imdad Ahad
4d124a5711 Refactor test to use client fixture 2017-01-24 11:01:44 +00:00
Imdad Ahad
343bf9ab98 Show delivered+failed on platform admin sent totals 2017-01-23 11:59:37 +00:00
Rebecca Law
8b89b7f911 Remove print statements. 2017-01-04 13:02:01 +00:00
Rebecca Law
21582cadb3 Get the BooleanField working in the form. 2017-01-03 16:14:25 +00:00
Rebecca Law
5572d0f25f This commit renders the platform admin page with the given start and end date query params.
Need to add a form to the page to take these params.
2016-12-28 15:23:19 +00:00
Rebecca Law
df41da4860 [WIP] Attempt at adding a form to the platform admin page is not working well for me here. But I want to commit it so I can look at it again. 2016-12-28 14:44:53 +00:00
Jenny Duckett
93405dd56b Move day and test key messages to <p> instead of left column
We don't want large numbers in Production to start overlapping other columns
in the tables when they have less space available, and putting these messages
at the top of the page under the h1 means that we don't need an extra column
on the page yet.
2016-12-06 12:46:11 +00:00
Jenny Duckett
3a637c8fa9 Move "Today" heading to left column on platform admin page
When we make the numbers on this page more filterable the date range will be
one of the options to change, so it makes sense to move it to the side now
instead of leaving it above the big numbers.
2016-12-06 12:42:27 +00:00
Jenny Duckett
c88a961e04 Add option to exclude test key stats on platform admin page
This page currently includes all notifications for all services, including
those sent using a test key. Stats on all other pages exclude test key usage,
though, which can lead to confusion for admins comparing numbers between
pages. Adding the option to toggle between including and excluding test key
usage on the platform admin page gives context for this difference, and allows
admins to see live usage of the platform as well as load associated with test
key usage.
2016-12-06 12:42:27 +00:00
Leo Hemsted
045864f052 Merge pull request #1022 from alphagov/deactivate-services-plat-admin
Deactivate services plat admin
2016-11-16 11:07:52 +00:00
Leo Hemsted
5edb8cd086 revert platform admin statistics
was erroneously using 'requested' rather than calculating 'sending'
2016-11-15 11:12:19 +00:00
Leo Hemsted
28adea52ab fix tests for new platform admin layout 2016-11-14 17:25:07 +00:00
Leo Hemsted
d26f7ac441 Merge branch 'master' of github.com:alphagov/notifications-admin into deactivate-services-plat-admin 2016-11-14 17:15:05 +00:00
Imdad Ahad
dbbb2f7848 Fix comment 2016-11-14 14:50:36 +00:00
Imdad Ahad
c1649e85a6 Ensure stats shown on platform admin are correct and refactor original test for new layout 2016-11-14 14:46:52 +00:00
Leo Hemsted
fb85877c75 add tests for platform admin list ordering 2016-11-14 11:33:39 +00:00
Chris Hill-Scott
88fff50ea3 Split platform admin page into live and trial mode
It sucks having to scroll down the massive list of services just to see
which ones are live.
2016-09-13 10:38:33 +01:00
Leo Hemsted
6ad7b019ea added tests for reworked platform admin page 2016-08-24 17:39:20 +01:00
Leo Hemsted
b983f020ff remove old statistics_api_client
now unused - replaced mock fn with detailed_services too
2016-08-24 16:26:08 +01:00
Chris Hill-Scott
e988a3633a Platform admin: Highlight service in research mode
Research mode trumps live.

Copies the same style we use in the page footer.
2016-06-23 17:47:19 +01:00
Chris Hill-Scott
0c31931876 Fix background colours on big numbers without links 2016-06-22 13:40:55 +01:00
Leo Hemsted
c5f8e1a259 Add live/trial flag on platform-admin page
Show 'Live' or 'Trial' under each service to easily identify services
2016-06-21 12:27:49 +01:00
Leo Hemsted
9669024f49 table with sending/delivered/failed stats for each service today 2016-05-31 14:10:32 +01:00
Leo Hemsted
83b151982e add stats boxes to platform admin page
moved a couple of stats summary functions from dashboard to a shared statistics_utils file
2016-05-31 12:17:06 +01:00
Leo Hemsted
ecf0dd7ebb move platform admin links platform admin page
removed "View providers" and "List all services" from the choose service page and the left-hand nav bar
2016-05-25 10:36:47 +01:00
Leo Hemsted
1292bf9fe6 New platform-admin-dashboard page 2016-05-25 09:48:45 +01:00