Skip to content

Commit 581b1e0

Browse files
authored
Merge pull request #4833 from nhsuk/next
Version 5.1.0
2 parents 0805871 + b64c45c commit 581b1e0

File tree

156 files changed

+7184
-1827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+7184
-1827
lines changed

.github/workflows/deploy-application.yml

Lines changed: 22 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ on:
4747
(Git ref to deploy, for example, a tag, branch name or commit SHA. Will use workflow ref if not provided.)
4848
required: true
4949
type: string
50+
app_version:
51+
required: true
52+
type: string
5053

51-
permissions: {}
54+
permissions: { }
5255

5356
env:
5457
environment: ${{ inputs.environment }}
@@ -58,15 +61,15 @@ env:
5861
|| 'arn:aws:iam::393416225559:role/GithubDeployECSService' }}
5962
aws_account_id: ${{ inputs.environment == 'production' && '820242920762' || '393416225559' }}
6063
cluster_name: mavis-${{ inputs.environment }}
61-
app_version: ${{ inputs.git_ref_to_deploy == '' && 'unknown' || inputs.git_ref_to_deploy }}
64+
app_version: ${{ inputs.app_version || inputs.git_ref_to_deploy || 'unknown' }}
6265

6366
concurrency:
6467
group: deploy-application-${{ inputs.environment }}
6568

6669
jobs:
6770
determine-git-sha:
6871
runs-on: ubuntu-latest
69-
permissions: {}
72+
permissions: { }
7073
outputs:
7174
git-sha: ${{ steps.get-git-sha.outputs.git-sha }}
7275
steps:
@@ -89,7 +92,7 @@ jobs:
8992
prepare-deployment:
9093
name: Prepare deployment
9194
runs-on: ubuntu-latest
92-
needs: [determine-git-sha, build-and-push-image]
95+
needs: [ determine-git-sha, build-and-push-image ]
9396
permissions:
9497
id-token: write
9598
strategy:
@@ -141,84 +144,39 @@ jobs:
141144
needs: prepare-deployment
142145
environment: ${{ inputs.environment }}
143146
steps:
144-
- run: echo "Proceeding with deployment to $environment environment"
147+
- run: echo "Proceeding with deployment to $environment"
145148

146-
deploy-web:
147-
name: Deploy web service
149+
deploy-service:
150+
name: Deploy service
148151
runs-on: ubuntu-latest
149-
if: ${{ inputs.server_types == 'web' || inputs.server_types == 'all' }}
150-
needs: [prepare-deployment, approve-deployments]
151-
permissions:
152-
id-token: write
153-
steps:
154-
- name: Configure AWS Credentials
155-
uses: aws-actions/configure-aws-credentials@v5
156-
with:
157-
role-to-assume: ${{ env.aws_role }}
158-
aws-region: eu-west-2
159-
- name: Checkout code
160-
uses: actions/checkout@v5
161-
- name: Download web task definition artifact
162-
uses: actions/download-artifact@v5
163-
with:
164-
path: ${{ runner.temp }}
165-
name: ${{ inputs.environment }}-web-task-definition
166-
- name: Change family of task definition
167-
run: |
168-
file_path="${{ runner.temp }}/web-task-definition.json"
169-
family_name="mavis-web-task-definition-$environment"
170-
echo "$(jq --arg f "$family_name" '.family = $f' "$file_path")" > "$file_path"
171-
- name: Register web task definition
172-
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
173-
with:
174-
task-definition: ${{ runner.temp }}/web-task-definition.json
175-
- name: Create appspec.yml
176-
run: |
177-
cp config/templates/appspec.yaml.tpl appspec.yaml
178-
sed -i "s#TASK_DEFINITION_ARN#${{ steps.register-task-definition.outputs.task-definition-arn }}#g" appspec.yaml
179-
- name: Deploy web service with CodeDeploy
180-
id: deploy-web-service
181-
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
182-
with:
183-
task-definition: ${{ runner.temp }}/web-task-definition.json
184-
cluster: ${{ env.cluster_name }}
185-
service: mavis-${{ inputs.environment }}-web
186-
codedeploy-application: mavis-${{ inputs.environment }}
187-
codedeploy-deployment-group: blue-green-group-${{ inputs.environment }}
188-
- name: Wait for deployment to complete
189-
run: |
190-
echo "Waiting for CodeDeploy deployment ${{ steps.deploy-web-service.outputs.codedeploy-deployment-id }} to complete..."
191-
aws deploy wait deployment-successful --deployment-id "${{ steps.deploy-web-service.outputs.codedeploy-deployment-id }}"
192-
echo "Deployment successful"
193-
194-
deploy-sidekiq:
195-
name: Deploy sidekiq service
196-
runs-on: ubuntu-latest
197-
if: ${{ inputs.server_types == 'sidekiq' || inputs.server_types == 'all' }}
198-
needs: [prepare-deployment, approve-deployments]
152+
needs: [ prepare-deployment, approve-deployments ]
199153
permissions:
200154
id-token: write
155+
strategy:
156+
fail-fast: false
157+
matrix:
158+
service: ${{ inputs.server_types == 'all' && fromJSON('["web", "sidekiq"]') || fromJSON(format('["{0}"]', inputs.server_types)) }}
201159
steps:
202160
- name: Configure AWS Credentials
203161
uses: aws-actions/configure-aws-credentials@v5
204162
with:
205163
role-to-assume: ${{ env.aws_role }}
206164
aws-region: eu-west-2
207-
- name: Download sidekiq task definition artifact
165+
- name: Download ${{ matrix.service }} task definition artifact
208166
uses: actions/download-artifact@v5
209167
with:
210168
path: ${{ runner.temp }}
211-
name: ${{ inputs.environment }}-sidekiq-task-definition
169+
name: ${{ inputs.environment }}-${{ matrix.service }}-task-definition
212170
- name: Change family of task definition
213171
run: |
214-
file_path="${{ runner.temp }}/sidekiq-task-definition.json"
215-
family_name="mavis-sidekiq-task-definition-$environment"
172+
file_path="${{ runner.temp }}/${{ matrix.service }}-task-definition.json"
173+
family_name="mavis-${{ matrix.service }}-task-definition-$environment"
216174
echo "$(jq --arg f "$family_name" '.family = $f' "$file_path")" > "$file_path"
217-
- name: Deploy sidekiq service
175+
- name: Deploy ${{ matrix.service }} service
218176
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
219177
with:
220-
task-definition: ${{ runner.temp }}/sidekiq-task-definition.json
178+
task-definition: ${{ runner.temp }}/${{ matrix.service }}-task-definition.json
221179
cluster: ${{ env.cluster_name }}
222-
service: mavis-${{ inputs.environment }}-sidekiq
180+
service: mavis-${{ inputs.environment }}-${{ matrix.service }}
223181
force-new-deployment: true
224182
wait-for-service-stability: true

.github/workflows/deploy-infrastructure.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ jobs:
6161
uses: hashicorp/setup-terraform@v3
6262
with:
6363
terraform_version: 1.13.3
64-
- name: Check if any deployments are running
65-
run: ../scripts/check-for-running-deployments.sh $environment
6664
- name: Terraform Plan
6765
id: plan
6866
run: |

.github/workflows/deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
uses: ./.github/workflows/deploy-infrastructure.yml
147147
with:
148148
environment: ${{ inputs.environment }}
149-
git_ref_to_deploy: ${{ inputs.git_ref_to_deploy || github.ref_name }}
149+
git_ref_to_deploy: ${{ needs.determine-git-sha.outputs.git-sha }}
150150
deploy-application:
151151
permissions:
152152
id-token: write
@@ -156,4 +156,5 @@ jobs:
156156
with:
157157
environment: ${{ inputs.environment }}
158158
server_types: ${{ inputs.server_types }}
159-
git_ref_to_deploy: ${{ inputs.git_ref_to_deploy || github.ref_name }}
159+
git_ref_to_deploy: ${{ needs.determine-git-sha.outputs.git-sha }}
160+
app_version: ${{ inputs.git_ref_to_deploy == '' && github.ref_name || inputs.git_ref_to_deploy }}

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Rails/LexicallyScopedActionFilter:
4242
Rails/Output:
4343
Exclude:
4444
- app/lib/mavis_cli/**/*.rb
45+
- app/lib/timeline_records.rb
4546

4647
Rails/UnknownEnv:
4748
Environments:

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GIT
22
remote: https://github.com/citizensadvice/capybara_accessible_selectors
3-
revision: 556f423037c337df588066eca89e13e7c4184a1f
3+
revision: b7153d7e682c5093dd6c40ce35ae4fa61f583ef1
44
branch: main
55
specs:
6-
capybara_accessible_selectors (0.13.0)
6+
capybara_accessible_selectors (0.14.0)
77
capybara (~> 3.36)
88

99
GIT
@@ -137,7 +137,7 @@ GEM
137137
aws-sdk-kms (1.113.0)
138138
aws-sdk-core (~> 3, >= 3.231.0)
139139
aws-sigv4 (~> 1.5)
140-
aws-sdk-rds (1.294.0)
140+
aws-sdk-rds (1.295.0)
141141
aws-sdk-core (~> 3, >= 3.231.0)
142142
aws-sigv4 (~> 1.5)
143143
aws-sdk-s3 (1.199.1)
@@ -312,7 +312,7 @@ GEM
312312
jmespath (1.6.2)
313313
jsbundling-rails (1.3.1)
314314
railties (>= 6.0.0)
315-
json (2.15.0)
315+
json (2.15.1)
316316
json-jwt (1.16.6)
317317
activesupport (>= 4.2)
318318
aes_key_wrap
@@ -453,7 +453,7 @@ GEM
453453
activesupport (>= 3.0.0)
454454
raabro (1.4.0)
455455
racc (1.8.1)
456-
rack (3.2.1)
456+
rack (3.2.2)
457457
rack-oauth2 (2.2.1)
458458
activesupport
459459
attr_required
@@ -520,7 +520,7 @@ GEM
520520
erb
521521
psych (>= 4.0.0)
522522
redcarpet (3.6.1)
523-
redis-client (0.25.3)
523+
redis-client (0.26.1)
524524
connection_pool
525525
redis-prescription (2.6.0)
526526
regexp_parser (2.11.3)
@@ -627,7 +627,7 @@ GEM
627627
sidekiq (>= 3.0)
628628
shoulda-matchers (6.5.0)
629629
activesupport (>= 5.2.0)
630-
sidekiq (8.0.7)
630+
sidekiq (8.0.8)
631631
connection_pool (>= 2.5.0)
632632
json (>= 2.9.0)
633633
logger (>= 1.6.2)

app/assets/stylesheets/application.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@forward "vendor/nhsuk-frontend" with (
33
$nhsuk-page-width: 1100px,
44
$nhsuk-grid-widths: (
5+
one-fifth: 20%,
56
one-quarter: 25%,
67
one-third: 33.3333%,
78
one-half: 50%,

app/assets/stylesheets/components/_filters.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@
7373
transform: rotate(-45deg) scale(0.6667);
7474
}
7575
}
76+
77+
& .nhsuk-hint {
78+
margin: 0;
79+
padding: 0;
80+
}
7681
}

app/components/app_consent_card_component.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def call
1818
attr_reader :consent, :session
1919

2020
delegate :patient, :programme, to: :consent
21-
delegate :consent_status_tag, :govuk_summary_list, to: :helpers
21+
delegate :consent_response_tag, :govuk_summary_list, to: :helpers
2222

2323
def link_to
2424
session_patient_programme_consent_path(session, patient, programme, consent)
@@ -52,10 +52,10 @@ def rows
5252
},
5353
{
5454
key: {
55-
text: "Decision"
55+
text: "Response"
5656
},
5757
value: {
58-
text: consent_status_tag(consent)
58+
text: consent_response_tag(consent)
5959
}
6060
},
6161
if consent.vaccine_method_nasal?

app/components/app_consent_summary_component.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def call
3434
end
3535

3636
summary_list.with_row do |row|
37-
row.with_key { "Decision" }
38-
row.with_value { consent_status_tag(consent) }
37+
row.with_key { "Response" }
38+
row.with_value { consent_response_tag(consent) }
3939
if (href = change_links[:response])
4040
row.with_action(
4141
text: "Change",
@@ -96,5 +96,5 @@ def call
9696
attr_reader :consent, :change_links
9797

9898
delegate :programme, to: :consent
99-
delegate :consent_status_tag, :govuk_summary_list, to: :helpers
99+
delegate :consent_response_tag, :govuk_summary_list, to: :helpers
100100
end

app/components/app_patient_search_form_component.rb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ class AppPatientSearchFormComponent < ViewComponent::Base
3131
<% end %>
3232
<% end %>
3333
<% end %>
34+
35+
<% if tallying_enabled? && show_still_to_vaccinate %>
36+
<%= f.govuk_check_boxes_fieldset :show_only, multiple: false, legend: { text: "Show only", size: "s" } do %>
37+
<%= f.govuk_check_box :still_to_vaccinate,
38+
1, 0,
39+
checked: form.still_to_vaccinate,
40+
multiple: false,
41+
link_errors: true,
42+
label: { text: "Still to vaccinate" },
43+
hint: { text: "With consent, not refused vaccine, not vaccinated yet" }%>
44+
<% end %>
45+
<% end %>
3446
3547
<% if consent_statuses.any? %>
3648
<%= f.govuk_check_boxes_fieldset :consent_statuses, legend: { text: "Consent status", size: "s" } do %>
@@ -199,7 +211,8 @@ def initialize(
199211
vaccine_methods: [],
200212
year_groups: [],
201213
heading_level: 3,
202-
show_aged_out_of_programmes: false
214+
show_aged_out_of_programmes: false,
215+
show_still_to_vaccinate: false
203216
)
204217
@form = form
205218
@url = url
@@ -214,6 +227,7 @@ def initialize(
214227
@year_groups = year_groups
215228
@heading_level = heading_level
216229
@show_aged_out_of_programmes = show_aged_out_of_programmes
230+
@show_still_to_vaccinate = show_still_to_vaccinate
217231
end
218232

219233
private
@@ -229,11 +243,13 @@ def initialize(
229243
:vaccine_methods,
230244
:year_groups,
231245
:heading_level,
232-
:show_aged_out_of_programmes
246+
:show_aged_out_of_programmes,
247+
:show_still_to_vaccinate
233248

234249
delegate :format_year_group,
235250
:govuk_button_link_to,
236251
:govuk_details,
252+
:tallying_enabled?,
237253
to: :helpers
238254

239255
def open_details?

0 commit comments

Comments
 (0)