From 10565bd448579efe3e7a3ae7545af3f8d6e8c9a0 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 26 Jan 2022 17:14:52 +0100 Subject: [PATCH 1/2] Updated covid level text --- cara/apps/calculator/report_generator.py | 4 ++-- cara/apps/templates/cern/calculator.report.html.j2 | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index e703e225..ee33fbda 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -309,8 +309,8 @@ class ReportGenerator: context['calculator_prefix'] = self.calculator_prefix context['scale_warning'] = { 'level': 'red-4', - 'incidence_rate': 'higher or equal to 100 new cases per 100 000 inhabitants', - 'onsite_access': 'lower than 4000', + 'risk': 'strong', + 'onsite_access': '4’000', 'threshold': '5%' } return context diff --git a/cara/apps/templates/cern/calculator.report.html.j2 b/cara/apps/templates/cern/calculator.report.html.j2 index 78e73b8f..b01aad11 100644 --- a/cara/apps/templates/cern/calculator.report.html.j2 +++ b/cara/apps/templates/cern/calculator.report.html.j2 @@ -45,19 +45,19 @@
{% if scale_warning.level == "green-1" %} {% elif scale_warning.level == "yellow-2" %} {% elif scale_warning.level == "orange-3" %} {% elif scale_warning.level == "red-4" %} {% else %}

Note: The CERN COVID Level is not specified.

From 6b8f71048acfa8f748d5ed92e7ed97d141d877a2 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 26 Jan 2022 17:46:54 +0100 Subject: [PATCH 2/2] Added covid level variable comments on the code for future reference. --- cara/apps/calculator/report_generator.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index ee33fbda..1a688cc5 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -307,11 +307,13 @@ class ReportGenerator: ) context['permalink'] = generate_permalink(base_url, self.calculator_prefix, form) context['calculator_prefix'] = self.calculator_prefix + + # For further information about these values visit https://gitlab.cern.ch/cara/cara/-/merge_requests/321. context['scale_warning'] = { - 'level': 'red-4', - 'risk': 'strong', - 'onsite_access': '4’000', - 'threshold': '5%' + 'level': 'red-4', # 'red-4' - 'orange-3' - 'yellow-2' - 'green-1' + 'risk': 'strong', # 'strong' - 'medium' - 'reduced' - '' + 'onsite_access': '4’000', # '4’000' - '5’000' - '6’500' - '8’000' + 'threshold': '5%' # '5%' - '' - '' - '' } return context