Merge pull request #1326 from GSA/805-make-dashboard-links-clickable

805 make dashboard links clickable
This commit is contained in:
Carlo Costino
2024-04-03 19:03:41 -04:00
committed by GitHub
5 changed files with 20 additions and 47 deletions

View File

@@ -1,43 +1,25 @@
<div class="ajax-block-container">
<div class="grid-row grid-gap">
<div id="total-sms" class="grid-col-12">
<span class="big-number-with-status">
<a class="usa-link display-flex" href="{{ url_for('.view_notifications', service_id=service_id, message_type='sms', status='sending,delivered,failed') }}">
<div id="total-sms" class="grid-col-12 margin-top-2">
<span class="big-number-with-status display-block margin-bottom-2">
<p>
<span class="big-number-smaller">
<span class="big-number-number">
{% if statistics['sms']['requested'] is number %}
{{ "{:,}".format(statistics['sms']['requested']) }}
{{ "{:,}".format(statistics['sms']['requested']) }}
{% else %}
{{ statistics['sms']['requested'] }}
{{ statistics['sms']['requested'] }}
{% endif %}
</span>
<span class="big-number-label">{{ statistics['sms']['requested']|message_count_label('sms', suffix='sent') }}</span>
<span class="big-number-label">{{ statistics['sms']['requested']|message_count_label('sms', suffix='sent') }} in the last seven days</span>
</span>
</p>
<a class="usa-button usa-button--outline" href="{{ url_for('.view_notifications', service_id=service_id, message_type='sms', status='sending,delivered,failed') }}">
Details
</a>
{% if show_failures %}
<span class="big-number-status{% if statistics['sms']['show_warning'] is sameas true %} big-number-status--failing{% endif %}">
{% if statistics['sms']['failed'] %}
<a class="usa-link" href="{{ url_for('.view_notifications', service_id=service_id, message_type='sms', status='failed') }}">
{{ "{:,}".format(statistics['sms']['failed']) }}
failed {{ statistics['sms']['failed_percentage'] }}%
</a>
{% else %}
No failures
{% endif %}
</span>
{% endif %}
{# Removing the failures area for now, as the user can click on the above link to see all the details.
In the future state of the dashboard, the all statuses will be more apparent with data visualizations #}
</span>
</div>
<!-- <div id="total-email" class="grid-col-6">
<span class="big-number-with-status pilot-disabled">
<a class="usa-link display-block margin-bottom-1">
<span class="big-number-smaller">
<span class="big-number-number">0</span>
<span class="big-number-label">emails sent</span>
</span>
</a>
<span class="big-number-status">No failures</span>
</span>
</div> -->
</div>
</div>

View File

@@ -18,10 +18,9 @@
{{ ajax_block(partials, updates_url, 'upcoming') }}
<h2 class="font-body-xl margin-0">
<h2 class="font-body-2xl line-height-sans-2 margin-0">
Messages sent
</h2>
<p class="margin-top-0">In the last seven days</p>
{{ ajax_block(partials, updates_url, 'inbox') }}