From 3b91427e33a235476b867950b47b387059f73fd4 Mon Sep 17 00:00:00 2001 From: vermaas <vermaas@astron.nl> Date: Thu, 8 Dec 2022 11:16:43 +0100 Subject: [PATCH] new layout without input_content and output_content --- atdb/atdb/static/taskdatabase/style.css | 3 +- atdb/taskdatabase/services/algorithms.py | 85 +++++++++++-------- .../static/taskdatabase/style.css | 3 +- 3 files changed, 55 insertions(+), 36 deletions(-) diff --git a/atdb/atdb/static/taskdatabase/style.css b/atdb/atdb/static/taskdatabase/style.css index 86e9ac90..4cd9c346 100644 --- a/atdb/atdb/static/taskdatabase/style.css +++ b/atdb/atdb/static/taskdatabase/style.css @@ -113,11 +113,12 @@ p.title { } .modal-dialog .modal-lg { - max-width: 75% !important; + max-width: 80% !important; } .modal-content { overflow: scroll !important; + width:120% } .form-flex { diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index db7a4dfb..1f438525 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -716,45 +716,62 @@ def construct_summary(task): line += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>' + key + '</b></td></tr>' - line += '<th>input size</th>' \ - '<th>output size</th>' \ - '<th>size_ratio</th>' - line += '<tr>' - line += '<td>' + record['input_size_str'] + '</td>' + line += '<th></th><th>Name</th><th>Size</th>' + line += '<tr><td><b>Input</b></td>' + line += '<td>' + record['input_name'] + '</td>' + line += '<td>' + str(record['input_size']) + ' (' + record['input_size_str'] + ')</td>' + line += '</tr>' + line += '<tr><td><b>Output</b></td>' + line += '<td>' + record['output_name'] + '</td>' line += '<td>' + str(record['output_size']) + ' (' + record['output_size_str'] + ')</td>' + line += '</tr>' + line += '<tr><td><b>Ratio</b></td>' line += '<td>' + str(round(record['size_ratio'],3)) + '</td>' line += '</tr>' - input_content = record['input_content'] - line += '<th>Input Content</th>' - line += '<tr><td colspan="3">' - for filename in input_content: - line += filename + '\n' - line += '</td></tr>' - - output_content = record['output_content'] - line += '<th>Output Content</th>' - line += '<tr><td colspan="3">' - for filename in output_content: - line += filename + '\n' - line += '</td></tr>' - - to_add = record['to_add'] - if to_add: - line += '<th>to_add</th>' - line += '<tr><td colspan="3">' - for filename in to_add: - line += filename + '\n' - line += '</td></tr>' - - to_delete = record['to_delete'] - if to_delete: - line += '<th>to_delete</th>' - line += '<tr><td colspan="3">' - for filename in to_delete: - line += filename + '\n' - line += '</td></tr>' + try: + input_content = record['input_content'] + if input_content: + line += '<th>Input Content</th>' + line += '<tr><td colspan="3">' + for filename in input_content: + line += filename + '\n' + line += '</td></tr>' + except: + pass + + try: + output_content = record['output_content'] + if output_content: + line += '<th>Output Content</th>' + line += '<tr><td colspan="3">' + for filename in output_content: + line += filename + '\n' + line += '</td></tr>' + except: + pass + + try: + to_add = record['to_add'] + if to_add: + line += '<th>to_add</th>' + line += '<tr><td colspan="3">' + for filename in to_add: + line += filename + '\n' + line += '</td></tr>' + except: + pass + try: + to_delete = record['to_delete'] + if to_delete: + line += '<th>to_delete</th>' + line += '<tr><td colspan="3">' + for filename in to_delete: + line += filename + '\n' + line += '</td></tr>' + except: + pass results += line diff --git a/atdb/taskdatabase/static/taskdatabase/style.css b/atdb/taskdatabase/static/taskdatabase/style.css index 86e9ac90..4cd9c346 100644 --- a/atdb/taskdatabase/static/taskdatabase/style.css +++ b/atdb/taskdatabase/static/taskdatabase/style.css @@ -113,11 +113,12 @@ p.title { } .modal-dialog .modal-lg { - max-width: 75% !important; + max-width: 80% !important; } .modal-content { overflow: scroll !important; + width:120% } .form-flex { -- GitLab