Skip to content
Snippets Groups Projects

moved cumulatives to separate row

Merged Nico Vermaas requested to merge dev-nico into master
3 files
+ 32
12
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -346,14 +346,29 @@ def construct_tasks_per_workflow_html(request, workflow_results):
for status in settings.ALL_STATUSSES:
header += "<th>" + status + "</th>"
results_tasks += header + '<th class="failed">failed</th><th class="active">active</th><th>total</th><th>to process</th><th>processed</th><th>processing time</th>'
header += '<th class="failed">failed</th><th class="active">active</th><th>total</th>'
## header += '<th>to process</th><th>processed</th><th>processing time</th>'
results_tasks += header
for workflow_result in workflow_results:
d = workflow_result['nr_of_tasks_per_status']
link = construct_link_to_workflow_api(request, workflow_result)
##values = "<tr><td><b>" + link + "</b></td></tr><tr>"
values = "<tr><td colspan='5'><b>" + link + "</b></td></tr><tr>"
# values = "<tr><td colspan='5'><b>" + link + "</b></td></tr><tr>"
values = "<tr class='info'><td colspan='4'><b>" + link + "</b></td>"
# add sizes
values += "<td><b>size to process:</b> " + str(human_readable(workflow_result['size_to_process'])) + "</td>"
try:
percentage = round(int(workflow_result['size_processed']) / int(workflow_result['size_to_process']) * 100)
except:
percentage = 0
values += "<td><b>size processed:</b> " + str(human_readable(workflow_result['size_processed'])) + " (<b>"+ str(percentage) + "%</b>) </td>"
values += "<td><b>processing time:</b> " + str(workflow_result['total_processing_time']) + "</td>"
values += "<td colspan='8'></td></tr><tr>"
d = workflow_result['nr_of_tasks_per_status']
for key in d:
try:
@@ -371,13 +386,13 @@ def construct_tasks_per_workflow_html(request, workflow_results):
values += "<td class=" + style + ">" + str(percentage) + "% (" + link + ")</td>"
# add sizes
values += "<td>" + str(human_readable(workflow_result['size_to_process'])) + "</td>"
try:
percentage = round(int(workflow_result['size_processed']) / int(workflow_result['size_to_process']) * 100)
except:
percentage = 0
values += "<td>" + str(human_readable(workflow_result['size_processed'])) + " ("+ str(percentage) + "%) </td>"
values += "<td>" + str(workflow_result['total_processing_time']) + "</td>"
# values += "<td>" + str(human_readable(workflow_result['size_to_process'])) + "</td>"
# try:
# percentage = round(int(workflow_result['size_processed']) / int(workflow_result['size_to_process']) * 100)
# except:
# percentage = 0
# values += "<td>" + str(human_readable(workflow_result['size_processed'])) + " ("+ str(percentage) + "%) </td>"
# values += "<td>" + str(workflow_result['total_processing_time']) + "</td>"
results_tasks += "</tr><tr>" + values + "</tr>"
Loading