From 5ba11df324b433db389b3bfe11dc91d02cdba7b0 Mon Sep 17 00:00:00 2001 From: Rasmus Burge <80392398+RasmusBurge-CG@users.noreply.github.com> Date: Wed, 26 Aug 2026 08:58:43 +0200 Subject: [PATCH 1/4] Possible new layout for the admin view --- cg/server/admin.py | 25 ------------------------- cg/server/app.py | 1 + 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/cg/server/admin.py b/cg/server/admin.py index 19171a102f6..9391863a6af 100644 --- a/cg/server/admin.py +++ b/cg/server/admin.py @@ -133,27 +133,6 @@ def view_pacbio_sample_sequencing_metrics_link(unused1, unused2, model, unused3) ) -def view_application_text_column(unused1, unused2, model, attribute_name): - """Column formatter to widen long text columns.""" - del unused1, unused2 - text = getattr(model, attribute_name) - return ( - Markup(f"
{text}
") - if text - else "" - ) - - -def view_order_types(unused1, unused2, model, unused3): - del unused1, unused2, unused3 - order_type_list = "
".join(model.order_types) - return ( - Markup(f'
{order_type_list}
') - if model.order_type_applications - else "" - ) - - def view_sample_concentration_minimum(unused1, unused2, model, unused3): """Column formatter to append unit""" del unused1, unused2, unused3 @@ -319,14 +298,10 @@ class ApplicationView(BaseView): ] column_formatters = { "tag": view_application_version_link, - "order_types": view_order_types, "sample_concentration_minimum": view_sample_concentration_minimum, "sample_concentration_maximum": view_sample_concentration_maximum, "sample_concentration_minimum_cfdna": view_sample_concentration_minimum_cfdna, "sample_concentration_maximum_cfdna": view_sample_concentration_maximum_cfdna, - "limitations": view_application_text_column, - "comment": view_application_text_column, - "details": view_application_text_column, } column_filters = ["prep_category", "is_accredited", "is_archived", "read_type", "is_external"] column_searchable_list = ["tag", "prep_category", "description", "details"] diff --git a/cg/server/app.py b/cg/server/app.py index 88b86cd1785..70fcdc2e36a 100644 --- a/cg/server/app.py +++ b/cg/server/app.py @@ -67,6 +67,7 @@ def create_app(): def _load_config(app: Flask): app.config.update(app_config.model_dump()) app.secret_key = app_config.cg_secret_key + app.config["FLASK_ADMIN_FLUID_LAYOUT"] = True def _configure_extensions(app: Flask): From 64ea8036759d85c39a8299aee08b70a6c1e295c1 Mon Sep 17 00:00:00 2001 From: Rasmus Burge <80392398+RasmusBurge-CG@users.noreply.github.com> Date: Wed, 26 Aug 2026 09:25:12 +0200 Subject: [PATCH 2/4] move comments in customer view --- cg/server/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cg/server/admin.py b/cg/server/admin.py index 9391863a6af..a4b5351480e 100644 --- a/cg/server/admin.py +++ b/cg/server/admin.py @@ -453,7 +453,6 @@ class CustomerView(BaseView): "internal_id", "name", "data_archive_location", - "comment", "primary_contact", "delivery_contact", "label", @@ -463,6 +462,7 @@ class CustomerView(BaseView): "project_account_kth", "return_samples", "scout_access", + "comment", ] column_filters = ["priority", "scout_access", "data_archive_location", "label"] column_formatters = { From 332d3bb967e5415357554164fd05937be00decd9 Mon Sep 17 00:00:00 2001 From: Rasmus Burge <80392398+RasmusBurge-CG@users.noreply.github.com> Date: Wed, 26 Aug 2026 10:28:16 +0200 Subject: [PATCH 3/4] Changed customer table, requested by AG --- cg/server/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cg/server/admin.py b/cg/server/admin.py index a4b5351480e..24b610af0ac 100644 --- a/cg/server/admin.py +++ b/cg/server/admin.py @@ -452,16 +452,16 @@ class CustomerView(BaseView): column_list = [ "internal_id", "name", - "data_archive_location", + "label", "primary_contact", "delivery_contact", - "label", "lab_contact", "priority", - "project_account_KI", - "project_account_kth", + "agreement_registration", + "invoice_reference", "return_samples", "scout_access", + "data_archive_location", "comment", ] column_filters = ["priority", "scout_access", "data_archive_location", "label"] From 2943bbdb78979d731ff44402f13ea79d616b5d11 Mon Sep 17 00:00:00 2001 From: Rasmus Burge <80392398+RasmusBurge-CG@users.noreply.github.com> Date: Wed, 26 Aug 2026 11:57:31 +0200 Subject: [PATCH 4/4] Revert "Changed customer table, requested by AG" This reverts commit 332d3bb967e5415357554164fd05937be00decd9. --- cg/server/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cg/server/admin.py b/cg/server/admin.py index 24b610af0ac..a4b5351480e 100644 --- a/cg/server/admin.py +++ b/cg/server/admin.py @@ -452,16 +452,16 @@ class CustomerView(BaseView): column_list = [ "internal_id", "name", - "label", + "data_archive_location", "primary_contact", "delivery_contact", + "label", "lab_contact", "priority", - "agreement_registration", - "invoice_reference", + "project_account_KI", + "project_account_kth", "return_samples", "scout_access", - "data_archive_location", "comment", ] column_filters = ["priority", "scout_access", "data_archive_location", "label"]