Skip to content

Commit e45e42f

Browse files
committed
Add html templates to upload a file and get a link to results
1 parent ff49fcf commit e45e42f

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

fastapi_app/templates/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ <h3>Actual multi-vector-simulator's version for open_plan: {{ mvs_open_plan_vers
3939
<input name="json_file" type="file" multiple>
4040
<input value="Run simulation" type="submit">
4141
</form>
42+
43+
<p>Upload a mvs input json file, formated as epa and click on "Run sensitivity analysis"</p>
44+
<form action="/uploadjson-sensitivity-analysis/open_plan" enctype="multipart/form-data" method="post">
45+
<!-- the value of `name` property should be used in the uploadjson endpoint function -->
46+
<input name="json_file" type="file" multiple>
47+
<input value="Run sensitivity analysis" type="submit">
48+
</form>
49+
50+
4251
</div>
4352

4453

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% extends 'index.html' %}
2+
3+
{% block body %}
4+
5+
<div>
6+
<h2>Sensitivity Analysis</h2>
7+
{% if task_id %}
8+
<p>
9+
{{ task_id }}: <a href="{{ url_for('check_sensitivity_analysis', task_id=task_id) }}">results</a>
10+
</p>
11+
{% else %}
12+
<p> The input parameters were not found in the input json file</p>
13+
{% endif %}
14+
</div>
15+
16+
{% endblock body %}

0 commit comments

Comments
 (0)