Merge pull request #1370 from GSA/1213-clean-up-usage-content

1213 - Removed the Usage page and updated the Dashboard Landing page
This commit is contained in:
Carlo Costino
2024-04-03 19:10:33 -04:00
committed by GitHub
9 changed files with 18 additions and 63 deletions

View File

@@ -14,7 +14,7 @@
<li class="usa-sidenav__item"><a class="{{ casework_navigation.is_selected('sent-messages') }}" href="{{ url_for('.view_notifications', service_id=current_service.id, status='sending,delivered,failed') }}">Sent messages</a></li>
{% endif %}
{% if current_user.has_permissions('manage_service', allow_org_user=True) %}
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
{# <li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li> #}
{% endif %}
<!-- {% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('settings') }}" href="{{ url_for('.service_settings', service_id=current_service.id) }}">Settings</a></li>

View File

@@ -7,7 +7,7 @@
</caption>
<thead>
<tr>
<th scope="col">Usage</th>
<th scope="col">Sent</th>
<th scope="col">Remaining</th>
</tr>
</thead>

View File

@@ -95,36 +95,16 @@
</table>
</div>
<h2 class="margin-top-4 margin-bottom-1">Usage</h2>
<h3 class="margin-bottom-0">Daily</h3>
<p class="margin-0">Across all services</p>
<table class="usage-table usa-table usa-table--borderless margin-top-1 margin-bottom-5">
<caption class="usa-sr-only">
Daily
</caption>
<thead>
<tr>
<th scope="col">Usage</th>
<th scope="col">Remaining</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ global_message_limit - daily_global_messages_remaining }}</td>
<td>
{{ daily_global_messages_remaining }}
</td>
</tr>
</tbody>
</table>
<h2 class="margin-top-4 margin-bottom-1">Message count</h2>
{% if current_user.has_permissions('manage_service') %}
<h3 class='margin-bottom-0' id="current-year"></h3>
{{ ajax_block(partials, updates_url, 'usage') }}
<a
href="{{ url_for('.usage', service_id=current_service['id']) }}"
class="usa-link show-more"
><span>See all usage</span></a>
<p class="margin-top-0">During the pilot period, each service has an allowance of 250,000 message parts. Once this allowance is met, the
application will stop delivering messages. There's no monthly charge, no setup fee, and no procurement cost.</p>
<p class="align-with-heading-copy">
What counts as 1 text message part?<br />
See <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a>.
</p>
{% endif %}
</div>

View File

@@ -21,9 +21,6 @@
<div class='grid-row'>
<div class='grid-col-12'>
<h2 class="heading-small margin-bottom-1">Daily messages across all services</h2>
<p class="margin-0">You have sent {{ global_message_limit - daily_global_messages_remaining }} of your {{ global_message_limit }} daily messages allowance.</p>
<p class="margin-0"></p>You have {{ daily_global_messages_remaining }} messages remaining.</p>
<h2 class='heading-small margin-bottom-1'>Text message parts</h2>
<div class="keyline-block">
You have sent
@@ -82,8 +79,8 @@
empty_message='',
field_headings=[
'By month',
hidden_field_heading('Text messages'),
hidden_field_heading('Cost'),
'Text message parts',
'Total message allowance',
],
field_headings_visible=True
) %}
@@ -109,14 +106,9 @@
{% endcall %}
{% endfor %}
{% call field(align='left') %}
{{ big_number(
item.sms_cost,
currency="$",
smallest=True
) }}
<ul>
{% if item.sms_free_allowance_used %}
<li class="tabular-numbers">{{ item.sms_free_allowance_used|format_thousands }} free {{ item.sms_free_count|message_count_label('sms', suffix='') }}</li>
<li class="tabular-numbers">{{ item.sms_free_allowance_used|format_thousands }} total {{ item.sms_free_count|message_count_label('parts', suffix='') }}</li>
{% endif %}
{% for sms in item.sms_breakdown %}
<li class="tabular-numbers">{{ sms.charged_units|message_count('sms') }} at