aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/comparisons
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2023-04-26 12:05:07 +0000
committerTibor Frank <tifrank@cisco.com>2023-04-26 12:05:07 +0000
commitf451c7a50bc663a6727f01873b8663bfa9ae22e1 (patch)
treed8d02e5726e1676a825a5414340bc13754213842 /csit.infra.dash/app/cdash/comparisons
parent272dec4e1f9bb0d04e0546e705aaecf314d7cd28 (diff)
C-Dash: Fix comparison tables
Change-Id: I60584ac6672f6dba04ae675a0e6bf1df0b4f783b Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'csit.infra.dash/app/cdash/comparisons')
-rw-r--r--csit.infra.dash/app/cdash/comparisons/layout.py16
1 files 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,