Skip to content
Snippets Groups Projects
Commit f53dffa2 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

setting up the mechanism

parent f3075ad1
No related branches found
No related tags found
1 merge request!320SDC 1005 multiple summary structures
Pipeline #56436 passed
...@@ -83,7 +83,7 @@ def convert_logentries_to_html(log_entries): ...@@ -83,7 +83,7 @@ def convert_logentries_to_html(log_entries):
results = "" results = ""
try: try:
results += '<th>service</th><th>step</th><th>status</th><th width="200pixels">timestamp</th><th>cpu_cycles</th><th>wall_clock_time</th><th>log</th>' results += '<th>service</th><th>step</th><th>status</th><th width="200px">timestamp</th><th>cpu_cycles</th><th>wall_clock_time</th><th>log</th>'
results += "<tbody>" results += "<tbody>"
for log in log_entries: for log in log_entries:
line = "<tr><td><b>" + str(log.service) + '</b></td>' line = "<tr><td><b>" + str(log.service) + '</b></td>'
...@@ -799,7 +799,7 @@ def construct_inspectionplots(task, expand_image="False", source='task_id'): ...@@ -799,7 +799,7 @@ def construct_inspectionplots(task, expand_image="False", source='task_id'):
return results return results
def construct_summary(task): def construct_default_summary(task):
totals = "" totals = ""
results = "" results = ""
...@@ -937,3 +937,25 @@ def construct_summary(task): ...@@ -937,3 +937,25 @@ def construct_summary(task):
results = title + totals + results results = title + totals + results
return results return results
def construct_summary(task):
# not every workflow has the same summary structure
# determine the flavour based on the selected task, and construct the html accordingly
SUMMARY_FLAVOUR = "default"
try:
summary = task.quality_json["summary"]
for key in summary:
if key == 'details':
SUMMARY_FLAVOUR = "imaging"
except:
pass
html = construct_default_summary(task)
return html
\ No newline at end of file
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 22 Aug 2023 <p class="footer"> Version 28 Aug 2023
</div> </div>
{% include 'taskdatabase/refresh.html' %} {% include 'taskdatabase/refresh.html' %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment