mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Replace "primary", etc. with "first", etc.
Using "primary" made sense when the other "secondary" provider was new, but today we see them as equivalent and the terminology is a bit confusing. In future we may add a third provider as well.
This commit is contained in:
@@ -73,19 +73,19 @@ def edit_sms_provider_ratio():
|
|||||||
if len(providers) < 2:
|
if len(providers) < 2:
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
primary_provider, secondary_provider = providers[0:2]
|
first_provider, second_provider = providers[0:2]
|
||||||
|
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
provider_client.update_provider(primary_provider['id'], form.percentage_left)
|
provider_client.update_provider(first_provider['id'], form.percentage_left)
|
||||||
provider_client.update_provider(secondary_provider['id'], form.percentage_right)
|
provider_client.update_provider(second_provider['id'], form.percentage_right)
|
||||||
return redirect(url_for('.edit_sms_provider_ratio'))
|
return redirect(url_for('.edit_sms_provider_ratio'))
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/providers/edit-sms-provider-ratio.html',
|
'views/providers/edit-sms-provider-ratio.html',
|
||||||
versions=_chunk_versions_by_day(_get_versions_since_switchover(primary_provider['id'])),
|
versions=_chunk_versions_by_day(_get_versions_since_switchover(first_provider['id'])),
|
||||||
form=form,
|
form=form,
|
||||||
primary_provider=providers[0]['display_name'],
|
first_provider=providers[0]['display_name'],
|
||||||
secondary_provider=providers[1]['display_name'],
|
second_provider=providers[1]['display_name'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
<div class="govuk-grid-column-two-thirds">
|
<div class="govuk-grid-column-two-thirds">
|
||||||
<div class="history-list-percentage-without-border">
|
<div class="history-list-percentage-without-border">
|
||||||
<div class="history-list-percentage-left-label">
|
<div class="history-list-percentage-left-label">
|
||||||
{{ primary_provider }}
|
{{ first_provider }}
|
||||||
</div>
|
</div>
|
||||||
<div class="history-list-percentage-right-label">
|
<div class="history-list-percentage-right-label">
|
||||||
{{ secondary_provider }}
|
{{ second_provider }}
|
||||||
</div>
|
</div>
|
||||||
{% call form_wrapper() %}
|
{% call form_wrapper() %}
|
||||||
<div class="radio-slider" data-module="radio-slider">
|
<div class="radio-slider" data-module="radio-slider">
|
||||||
@@ -71,11 +71,11 @@
|
|||||||
<div class="govuk-grid-column-two-thirds">
|
<div class="govuk-grid-column-two-thirds">
|
||||||
<div class="history-list-percentage">
|
<div class="history-list-percentage">
|
||||||
<div class="history-list-percentage-left-label">
|
<div class="history-list-percentage-left-label">
|
||||||
{{ primary_provider }}<br><br>
|
{{ first_provider }}<br><br>
|
||||||
{{ version.priority|format_thousands }}%
|
{{ version.priority|format_thousands }}%
|
||||||
</div>
|
</div>
|
||||||
<div class="history-list-percentage-right-label">
|
<div class="history-list-percentage-right-label">
|
||||||
{{ secondary_provider }}<br><br>
|
{{ second_provider }}<br><br>
|
||||||
{{ (100 - version.priority)|format_thousands }}%
|
{{ (100 - version.priority)|format_thousands }}%
|
||||||
</div>
|
</div>
|
||||||
<div class="history-list-percentage-marker" style="left: {{ (100 -version.priority)|format_thousands }}%"></div>
|
<div class="history-list-percentage-marker" style="left: {{ (100 -version.priority)|format_thousands }}%"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user