Skip to content
Snippets Groups Projects
Commit bebc4b3d authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Fix return for template function

parent 8b926bdf
Branches
No related tags found
3 merge requests!143Query Page:,!120Master,!119Master
Pipeline #12009 passed
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<script> <script>
var inputs_values = {{ results | safe }} var inputs_values = {{ resultsjson | safe }}
function generate_tree(tree, div) { function generate_tree(tree, div) {
if (Array.isArray(tree)) { if (Array.isArray(tree)) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<script> <script>
var output_values = {{ results | safe }} var output_values = {{ resultsjson | safe }}
function generate_tree(tree, div) { function generate_tree(tree, div) {
if (Array.isArray(tree)) { if (Array.isArray(tree)) {
......
...@@ -267,7 +267,7 @@ def ShowInputs(request, id): ...@@ -267,7 +267,7 @@ def ShowInputs(request, id):
# convert the json to a presentable piece of html for the output template # convert the json to a presentable piece of html for the output template
results = algorithms.convert_list_of_dicts_to_html(task.inputs) results = algorithms.convert_list_of_dicts_to_html(task.inputs)
return render(request, "taskdatabase/details/inputs.html", {'results': results}) return render(request, "taskdatabase/details/inputs.html", {'results': results, 'resultsjson': task.inputs})
def ShowOutputs(request, id): def ShowOutputs(request, id):
...@@ -275,7 +275,7 @@ def ShowOutputs(request, id): ...@@ -275,7 +275,7 @@ def ShowOutputs(request, id):
# convert the json to a presentable piece of html for the output template # convert the json to a presentable piece of html for the output template
results = algorithms.convert_list_of_dicts_to_html(task.outputs) results = algorithms.convert_list_of_dicts_to_html(task.outputs)
return render(request, "taskdatabase/details/outputs.html", {'results': results}) return render(request, "taskdatabase/details/outputs.html", {'results': results, 'resultsjson': task.outputs})
def ShowMetrics(request, id): def ShowMetrics(request, id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment