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:
Ben Thorner
2022-03-25 16:37:36 +00:00
parent 55e2a2f96b
commit 59f6b0b5d8
2 changed files with 10 additions and 10 deletions

View File

@@ -73,19 +73,19 @@ def edit_sms_provider_ratio():
if len(providers) < 2:
abort(400)
primary_provider, secondary_provider = providers[0:2]
first_provider, second_provider = providers[0:2]
if form.validate_on_submit():
provider_client.update_provider(primary_provider['id'], form.percentage_left)
provider_client.update_provider(secondary_provider['id'], form.percentage_right)
provider_client.update_provider(first_provider['id'], form.percentage_left)
provider_client.update_provider(second_provider['id'], form.percentage_right)
return redirect(url_for('.edit_sms_provider_ratio'))
return render_template(
'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,
primary_provider=providers[0]['display_name'],
secondary_provider=providers[1]['display_name'],
first_provider=providers[0]['display_name'],
second_provider=providers[1]['display_name'],
)

View File

@@ -22,10 +22,10 @@
<div class="govuk-grid-column-two-thirds">
<div class="history-list-percentage-without-border">
<div class="history-list-percentage-left-label">
{{ primary_provider }}
{{ first_provider }}
</div>
<div class="history-list-percentage-right-label">
{{ secondary_provider }}
{{ second_provider }}
</div>
{% call form_wrapper() %}
<div class="radio-slider" data-module="radio-slider">
@@ -71,11 +71,11 @@
<div class="govuk-grid-column-two-thirds">
<div class="history-list-percentage">
<div class="history-list-percentage-left-label">
{{ primary_provider }}<br><br>
{{ first_provider }}<br><br>
{{ version.priority|format_thousands }}%
</div>
<div class="history-list-percentage-right-label">
{{ secondary_provider }}<br><br>
{{ second_provider }}<br><br>
{{ (100 - version.priority)|format_thousands }}%
</div>
<div class="history-list-percentage-marker" style="left: {{ (100 -version.priority)|format_thousands }}%"></div>