diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index b4bd4905dd6439603a8d91d15c38e21164b2e85d..4e8cbfa1d8579d9532b792ac96403ffa98d46206 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -83,7 +83,7 @@ def convert_logentries_to_html(log_entries): results = "" 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>" for log in log_entries: line = "<tr><td><b>" + str(log.service) + '</b></td>' @@ -799,7 +799,7 @@ def construct_inspectionplots(task, expand_image="False", source='task_id'): return results -def construct_summary(task): +def construct_default_summary(task): totals = "" results = "" @@ -937,3 +937,25 @@ def construct_summary(task): results = title + totals + 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 diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 0c25d8e8e45694026eb2d357ad1d7f7c02fc95f8..01a7d0135691539899809a5b7ea838612e3800c5 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -31,7 +31,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 22 Aug 2023 + <p class="footer"> Version 28 Aug 2023 </div> {% include 'taskdatabase/refresh.html' %}