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.
This commit is contained in:
Jenny Duckett
2016-12-06 12:38:12 +00:00
parent df265f188d
commit 93405dd56b
2 changed files with 33 additions and 40 deletions

View File

@@ -87,45 +87,38 @@
Platform admin
</h1>
<div class="grid-row">
<div class="column-one-third">
<nav class="navigation">
<ul>
<li>Showing stats for today</li>
{% if include_from_test_key %}
<li>Including test key (<a href="{{ url_for('.platform_admin', include_from_test_key=False) }}">change</a>)</li>
{% else %}
<li>Excluding test key (<a href="{{ url_for('.platform_admin') }}">change</a>)</li>
{% endif %}
</ul>
</nav>
<p class="bottom-gutter-2">
Showing stats for today&emsp;
{% if include_from_test_key %}
Including test keys (<a href="{{ url_for('.platform_admin', include_from_test_key=False) }}">change</a>)
{% else %}
Excluding test keys (<a href="{{ url_for('.platform_admin') }}">change</a>)
{% endif %}
</p>
<div class="grid-row bottom-gutter">
<div class="column-half">
{{ big_number_with_status(
global_stats.email.delivered,
message_count_label(global_stats.email.delivered, 'email'),
global_stats.email.failed,
global_stats.email.failure_rate,
global_stats.email.failure_rate|float > 3,
) }}
</div>
<div class="column-half">
{{ big_number_with_status(
global_stats.sms.delivered,
message_count_label(global_stats.sms.delivered, 'sms'),
global_stats.sms.failed,
global_stats.sms.failure_rate,
global_stats.sms.failure_rate|float > 3,
) }}
</div>
<main role="main" class="column-two-thirds column-main">
<div class="grid-row bottom-gutter">
<div class="column-half">
{{ big_number_with_status(
global_stats.email.delivered,
message_count_label(global_stats.email.delivered, 'email'),
global_stats.email.failed,
global_stats.email.failure_rate,
global_stats.email.failure_rate|float > 3,
) }}
</div>
<div class="column-half">
{{ big_number_with_status(
global_stats.sms.delivered,
message_count_label(global_stats.sms.delivered, 'sms'),
global_stats.sms.failed,
global_stats.sms.failure_rate,
global_stats.sms.failure_rate|float > 3,
) }}
</div>
</div>
{{ services_table(live_services, 'Live services') }}
{{ services_table(trial_mode_services, 'Trial mode services') }}
</main>
</div>
{{ services_table(live_services, 'Live services') }}
{{ services_table(trial_mode_services, 'Trial mode services') }}
{% endblock %}

View File

@@ -88,8 +88,8 @@ def test_should_render_platform_admin_page(
@pytest.mark.parametrize('include_from_test_key, expected_text, unexpected_text, api_args', [
(True, 'Including test key', 'Excluding test key', {'detailed': True}),
(False, 'Excluding test key', 'Including test key', {'detailed': True, 'include_from_test_key': False})
(True, 'Including test keys', 'Excluding test keys', {'detailed': True}),
(False, 'Excluding test keys', 'Including test keys', {'detailed': True, 'include_from_test_key': False})
])
def test_platform_admin_toggle_including_from_test_key(
include_from_test_key,