added correct colors for warning animation

This commit is contained in:
Luis Aleixo 2021-08-02 14:07:13 +02:00
parent 75ae089f55
commit bb968e58e6
2 changed files with 60 additions and 57 deletions

View file

@ -53,12 +53,10 @@
<div class="collapse show" id="collapseResults">
<div class="card-body">
<p class="card-text">
<div class="d-flex flex-row">
<div class="align-self-center">
{% block report_summary %}
Taking into account the uncertainties tied to the model variables, in this scenario, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b><a href="#section1">[*]</a> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>.
{% endblock report_summary %}
</div>
<div class="align-self-center">
{% block report_summary %}
Taking into account the uncertainties tied to the model variables, in this scenario, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b><a href="#section1">[*]</a> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>.
{% endblock report_summary %}
</div>
<p id="section1">[*] The results are based on the parameters and assumptions published in the CERN Open Report <a href="https://cds.cern.ch/record/2756083"> CERN-OPEN-2021-004</a></p>
<img id="scenario_concentration_plot" src="{{ scenario_plot_src }}" />

View file

@ -7,61 +7,66 @@
{% endblock report_preamble_navtab %}
{% block report_summary %}
<span
{% if ((prob_inf > 15) or (expected_new_cases >= 1)) %}
><div class="alert alert-danger" role="alert">
<strong>Not Acceptable:</strong>
{{ super() }}
</div>
{% elif 5 <= prob_inf <= 15 %}
><div class="alert alert-warning" role="alert">
<strong>Attention:</strong>
{{ super() }}
<div>
{% elif prob_inf < 5 %}
><div class="alert alert-success" role="alert">
><strong>Acceptable:</strong>
{{ super() }}
</div>
{% endif %}
</span>
<div class="d-flex flex-row">
{% if (prob_inf > 5) %}
<div class="d-flex align-self-center w-75">
{% if scale_warning.level == "green-1" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Note: the current CERN COVID Scale is <b>Green - 1</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. Align your risk assessment with the guidance and instructions provided by the HSE Unit.
</div>
{% elif scale_warning.level == "yellow-2" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Note: the current CERN COVID Scale is <b>Yellow - 2</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. There is a reduced chance that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site which, during this stage, corresponds to an average daily on-site access {{scale_warning.onsite_access}}. See with your supervisor if this scenario is acceptable.
</div>
{% elif scale_warning.level == "orange-3" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Warning: the current CERN COVID Scale is <b>Orange - 3</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. There is a slight chance that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site which, during this stage, corresponds to an average daily on-site access {{scale_warning.onsite_access}}. See with your supervisor if any additional measures can be applied (ALARA).
</div>
{% elif scale_warning.level == "red-4" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Warning: the current CERN COVID Scale is <b>Red - 4</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. There is a strong chance that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site which, during this stage, corresponds to an average daily on-site access {{scale_warning.onsite_access}}. Please reduce the value below the threshold of <b>{{scale_warning.threshold}}</b>.
</div>
{% else %}
<p><b>Note:</b> The CERN COVID Level is not specified.</p>
<div class="d-flex">
<div class="card bg-light w-25 mb-3 mr-3">
<div class="card-header"><b>Probability of infection (%)</b></div>
{% if (prob_inf < 5)%} {% set warning_color = 'bg-success' %}
{% elif (prob_inf >= 5 and prob_inf <= 15) %} {% set warning_color = 'bg-warning' %}
{% else %} {% set warning_color= 'bg-danger' %}
{% endif %}
</div>
{% endif %}
<div class="w-25 align-self-center">
<div class="intro-banner-vdo-play-btn {{scale_warning.level}} m-auto">
<b style="color: #00000099">{{prob_inf | non_zero_percentage}}</b>
<div class="intro-banner-vdo-play-btn {{warning_color}} m-auto d-flex align-items-center justify-content-center">
<b style="color: #000000">{{prob_inf | non_zero_percentage}}</b>
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i>
<span class="ripple {{scale_warning.level}}"></span>
<span class="ripple {{scale_warning.level}}"></span>
<span class="ripple {{scale_warning.level}}"></span>
<span class="ripple {{warning_color}}"></span>
<span class="ripple {{warning_color}}"></span>
<span class="ripple {{warning_color}}"></span>
</div>
</div>
<div class="flew-row w-75">
<span
{% if ((prob_inf > 15) or (expected_new_cases >= 1)) %}
><div class="alert alert-danger" role="alert">
<strong>Not Acceptable:</strong>
{{ super() }}
</div>
{% elif 5 <= prob_inf <= 15 %}
><div class="alert alert-warning" role="alert">
<strong>Attention:</strong>
{{ super() }}
<div>
{% elif prob_inf < 5 %}
><div class="alert alert-success" role="alert">
><strong>Acceptable:</strong>
{{ super() }}
</div>
{% endif %}
</span>
{% if (prob_inf > 5) %}
{% if scale_warning.level == "green-1" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Note: the current CERN COVID Scale is <b>Green - 1</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. Align your risk assessment with the guidance and instructions provided by the HSE Unit.
</div>
{% elif scale_warning.level == "yellow-2" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Note: the current CERN COVID Scale is <b>Yellow - 2</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. There is a reduced chance that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site which, during this stage, corresponds to an average daily on-site access {{scale_warning.onsite_access}}. See with your supervisor if this scenario is acceptable.
</div>
{% elif scale_warning.level == "orange-3" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Warning: the current CERN COVID Scale is <b>Orange - 3</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. There is a slight chance that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site which, during this stage, corresponds to an average daily on-site access {{scale_warning.onsite_access}}. See with your supervisor if any additional measures can be applied (ALARA).
</div>
{% elif scale_warning.level == "red-4" %}
<div class="alert alert-dark" role="alert" style="height:fit-content">
Warning: the current CERN COVID Scale is <b>Red - 4</b>, which means the incidence rate in the local community is <b>{{scale_warning.incidence_rate}}</b>. There is a strong chance that asymptomatic or pre-symptomatic infected individuals circulate within the CERN site which, during this stage, corresponds to an average daily on-site access {{scale_warning.onsite_access}}. Please reduce the value below the threshold of <b>{{scale_warning.threshold}}</b>.
</div>
{% else %}
<p><b>Note:</b> The CERN COVID Level is not specified.</p>
{% endif %}
{% endif %}
</div>
</div>