From f451c7a50bc663a6727f01873b8663bfa9ae22e1 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Wed, 26 Apr 2023 12:05:07 +0000 Subject: C-Dash: Fix comparison tables Change-Id: I60584ac6672f6dba04ae675a0e6bf1df0b4f783b Signed-off-by: Tibor Frank --- csit.infra.dash/app/cdash/comparisons/layout.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/csit.infra.dash/app/cdash/comparisons/layout.py b/csit.infra.dash/app/cdash/comparisons/layout.py index d78123b187..a16277c0f1 100644 --- a/csit.infra.dash/app/cdash/comparisons/layout.py +++ b/csit.infra.dash/app/cdash/comparisons/layout.py @@ -678,7 +678,9 @@ class Layout: [ State("store-control-panel", "data"), State("store-selected", "data"), - State("store-table-data", "data") + State("store-table-data", "data"), + State("store-filtered-table-data", "data"), + State({"type": "table", "index": ALL}, "data") ], [ Input("url", "href"), @@ -693,6 +695,8 @@ class Layout: control_panel: dict, selected: dict, store_table_data: list, + filtered_data: list, + table_data: list, href: str, normalize: list, table_filter: str, @@ -722,8 +726,6 @@ class Layout: on_draw = False plotting_area = no_update - table_data = list() - filtered_data = None trigger = Trigger(callback_context.triggered) if trigger.type == "url" and url_params: @@ -946,12 +948,11 @@ class Layout: "cmp-val-val": str() }) elif trigger.type == "table" and trigger.idx == "comparison": - table_data = filter_table_data( + filtered_data = filter_table_data( store_table_data, table_filter[0] ) - filtered_data = table_data - table_data = [table_data, ] + table_data = [filtered_data, ] if all((on_draw, selected["reference"]["set"], selected["compare"]["set"], )): @@ -965,6 +966,9 @@ class Layout: ) ) store_table_data = table.to_dict("records") + filtered_data = store_table_data + if table_data: + table_data = [store_table_data, ] ret_val = [ ctrl_panel.panel, -- cgit 1.2.3-korg