Bumped up version and centralised version setting
This commit is contained in:
parent
824ad5886b
commit
ec6ef6a156
4 changed files with 9 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ class FormData:
|
|||
mask_type: str
|
||||
mask_wearing: str
|
||||
mechanical_ventilation_type: str
|
||||
model_version: str
|
||||
opening_distance: float
|
||||
recurrent_event_month: str
|
||||
room_number: str
|
||||
|
|
@ -101,6 +102,7 @@ class FormData:
|
|||
mask_type=form_data['mask_type'],
|
||||
mask_wearing=form_data['mask_wearing'],
|
||||
mechanical_ventilation_type=form_data['mechanical_ventilation_type'],
|
||||
model_version=form_data['model_version'],
|
||||
opening_distance=float(form_data['opening_distance']),
|
||||
recurrent_event_month=form_data['recurrent_event_month'],
|
||||
room_number=form_data['room_number'],
|
||||
|
|
@ -295,6 +297,7 @@ def baseline_raw_form_data():
|
|||
'mask_type': 'Type I',
|
||||
'mask_wearing': 'removed',
|
||||
'mechanical_ventilation_type': '',
|
||||
'model_version': 'BetaV1.1.0',
|
||||
'opening_distance': '0.2',
|
||||
'recurrent_event_month': 'January',
|
||||
'room_number': '123',
|
||||
|
|
|
|||
|
|
@ -87,8 +87,7 @@ def build_report(model: models.Model, form: FormData):
|
|||
'model': model,
|
||||
'request': request,
|
||||
'form': form,
|
||||
'creation_date': time,
|
||||
'model_version': 'Beta v1.0.0',
|
||||
'creation_date': time,
|
||||
}
|
||||
|
||||
context.update(calculate_report_data(model))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "layout.html.j2" %}
|
||||
|
||||
{% set MODEL_VERSION="BetaV1.1.0" %}
|
||||
{% set CALCULATOR_ACTIVE=1 %}
|
||||
{% set DEBUG=False %}
|
||||
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
<div class="text-component text-component-page clearfix"></div>
|
||||
<div style="height: 8em; display: block;"></div>
|
||||
|
||||
Beta v1.0.0 <span style="float:right; font-weight:bold">Please send feedback to <a href="mailto:CARA-dev@cern.ch">CARA-dev@cern.ch</a></span>
|
||||
{{ MODEL_VERSION }} <span style="float:right; font-weight:bold">Please send feedback to <a href="mailto:CARA-dev@cern.ch">CARA-dev@cern.ch</a></span>
|
||||
<h1> <p><b>CARA</b> Covid Airborne Risk Assessment tool</p></h1>
|
||||
|
||||
{% if DEBUG %}
|
||||
|
|
@ -28,6 +29,8 @@ Beta v1.0.0 <span style="float:right; font-weight:bold">Please send feedback to
|
|||
<form id="covid_calculator" name="covid_calculator" action="/calculator/report" onsubmit="return validate_form(this)" method="POST">
|
||||
{% endif %}
|
||||
|
||||
<input type="hidden" name="model_version" value={{ MODEL_VERSION }}></input>
|
||||
|
||||
<div style="width: 33%; float:left;">
|
||||
|
||||
<!-- General Options -->
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<h1>Output from CARA - COVID Airborne Risk Assessment tool</h1>
|
||||
|
||||
<p class=subtitle> Created {{ creation_date }} using model version {{ model_version }}</p><br>
|
||||
<p class=subtitle> Created {{ creation_date }} using model version {{ form.model_version }}</p><br>
|
||||
|
||||
<p>Simulation Name: {{ form.simulation_name }}</p>
|
||||
<p>Room Number: {{ form.room_number }}</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue