diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index 92405952b7a7b1cbc212d5dd2c442ec8c79d674d..f3f5d53bf098dcbe72f8422a1902284d3078ab33 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -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>" diff --git a/atdb/taskdatabase/static/taskdatabase/style.css b/atdb/taskdatabase/static/taskdatabase/style.css index 3eb74069d3c02a1910104389e4da9f11977f1d21..cd37610d0d4a9e84965c61b2034cf54c47824e68 100644 --- a/atdb/taskdatabase/static/taskdatabase/style.css +++ b/atdb/taskdatabase/static/taskdatabase/style.css @@ -59,6 +59,11 @@ p.title { font-size: 13pt; } +.info { + font-size: 13pt; + background-color: #E0F8F8; +} + .form-signin { width: 100%; max-width: 330px; diff --git a/atdb/taskdatabase/templates/dashboard/dashboard.html b/atdb/taskdatabase/templates/dashboard/dashboard.html index 2349368c92f462eec7e66fc2b35ddc3649dcb7b3..ab8de57111e0a6ac8d7cf3d65c20d4aa580ea954 100644 --- a/atdb/taskdatabase/templates/dashboard/dashboard.html +++ b/atdb/taskdatabase/templates/dashboard/dashboard.html @@ -19,7 +19,7 @@ </div> - <table class="table table-striped"> + <table class="table"> {{ results_tasks | safe }} </table>