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

moved cumulatives to separate row

parent 4abea68b
Branches
No related tags found
3 merge requests!83Master,!82Master,!80moved cumulatives to separate row
...@@ -346,14 +346,29 @@ def construct_tasks_per_workflow_html(request, workflow_results): ...@@ -346,14 +346,29 @@ def construct_tasks_per_workflow_html(request, workflow_results):
for status in settings.ALL_STATUSSES: for status in settings.ALL_STATUSSES:
header += "<th>" + status + "</th>" 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: for workflow_result in workflow_results:
d = workflow_result['nr_of_tasks_per_status']
link = construct_link_to_workflow_api(request, workflow_result) 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: for key in d:
try: try:
...@@ -371,13 +386,13 @@ def construct_tasks_per_workflow_html(request, workflow_results): ...@@ -371,13 +386,13 @@ def construct_tasks_per_workflow_html(request, workflow_results):
values += "<td class=" + style + ">" + str(percentage) + "% (" + link + ")</td>" values += "<td class=" + style + ">" + str(percentage) + "% (" + link + ")</td>"
# add sizes # add sizes
values += "<td>" + str(human_readable(workflow_result['size_to_process'])) + "</td>" # values += "<td>" + str(human_readable(workflow_result['size_to_process'])) + "</td>"
try: # try:
percentage = round(int(workflow_result['size_processed']) / int(workflow_result['size_to_process']) * 100) # percentage = round(int(workflow_result['size_processed']) / int(workflow_result['size_to_process']) * 100)
except: # except:
percentage = 0 # percentage = 0
values += "<td>" + str(human_readable(workflow_result['size_processed'])) + " ("+ str(percentage) + "%) </td>" # values += "<td>" + str(human_readable(workflow_result['size_processed'])) + " ("+ str(percentage) + "%) </td>"
values += "<td>" + str(workflow_result['total_processing_time']) + "</td>" # values += "<td>" + str(workflow_result['total_processing_time']) + "</td>"
results_tasks += "</tr><tr>" + values + "</tr>" results_tasks += "</tr><tr>" + values + "</tr>"
......
...@@ -59,6 +59,11 @@ p.title { ...@@ -59,6 +59,11 @@ p.title {
font-size: 13pt; font-size: 13pt;
} }
.info {
font-size: 13pt;
background-color: #E0F8F8;
}
.form-signin { .form-signin {
width: 100%; width: 100%;
max-width: 330px; max-width: 330px;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
&nbsp; &nbsp;
<table class="table table-striped"> <table class="table">
{{ results_tasks | safe }} {{ results_tasks | safe }}
</table> </table>
&nbsp; &nbsp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment