mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 08:59:49 -04:00
It’s not very useful to know the priority of one provider without knowing the other. And these pages were never really designed, so they weren’t super easy to understand anyway. This commit adds a page that takes the first two text message providers and shows their relative priority against each other. It follows the design of the events page, as a pattern for showing a log of historical events.
62 lines
2.0 KiB
HTML
62 lines
2.0 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
{% from "components/textbox.html" import textbox %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/form.html" import form_wrapper %}
|
|
|
|
{% block per_page_title %}
|
|
Text message providers
|
|
{% endblock %}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
{{ page_header('Text message providers') }}
|
|
|
|
{% call form_wrapper() %}
|
|
{% endcall %}
|
|
|
|
|
|
{% for day, versions in versions %}
|
|
<h2 class="heading-small top-gutter">
|
|
{% if day %}
|
|
{{ day|format_date_human|title }}
|
|
{% else %}
|
|
Start
|
|
{% endif %}
|
|
</h2>
|
|
<ul class="bottom-gutter">
|
|
{% for version in versions %}
|
|
<li class="history-list-item">
|
|
<div class="grid-row">
|
|
<div class="column-one-third">
|
|
<div class="history-list-user">
|
|
{{ version.created_by.name or (' '|safe) }}
|
|
</div>
|
|
{% if version.updated_at %}
|
|
<div class="history-list-time">
|
|
{{ version.updated_at|format_time }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="column-two-thirds">
|
|
{% set percentage = (version.priority / (version.priority + version.other_provider.priority) * 100) %}
|
|
<div class="history-list-percentage">
|
|
<div class="history-list-percentage-left-label">
|
|
{{ version.display_name }}<br><br>
|
|
{{ percentage|format_thousands }}%
|
|
</div>
|
|
<div class="history-list-percentage-right-label">
|
|
{{ version.other_provider.display_name }}<br><br>
|
|
{{ (100 - percentage)|format_thousands }}%
|
|
</div>
|
|
<div class="history-list-percentage-marker" style="left: {{ (100 -percentage)|format_thousands }}%"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|