aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/report/layout.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2023-11-27 13:28:49 +0000
committerTibor Frank <tifrank@cisco.com>2023-11-29 07:36:36 +0000
commit607fa0c71af07ba02785b8990a256725efccb983 (patch)
treedebd8558c70081438e71fade35098de66a4aeed3 /csit.infra.dash/app/cdash/report/layout.py
parentf4179bfe6f98388bbda067a414cf94b0b09a375d (diff)
C-Dash: Add bandwidth to iterative graphs
- ndr and pdr only for now Change-Id: I8b1992cfd38db4a1bea64d9579b3c8dc583556ec Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'csit.infra.dash/app/cdash/report/layout.py')
-rw-r--r--csit.infra.dash/app/cdash/report/layout.py63
1 files changed, 46 insertions, 17 deletions
diff --git a/csit.infra.dash/app/cdash/report/layout.py b/csit.infra.dash/app/cdash/report/layout.py
index 81cc913903..cbcc6e88b1 100644
--- a/csit.infra.dash/app/cdash/report/layout.py
+++ b/csit.infra.dash/app/cdash/report/layout.py
@@ -758,38 +758,55 @@ class Layout:
if not tests:
return C.PLACEHOLDER
- figs = graph_iterative(self._data, tests, self._graph_layout, normalize)
+ graphs = \
+ graph_iterative(self._data, tests, self._graph_layout, normalize)
- if not figs[0]:
+ if not graphs[0]:
return C.PLACEHOLDER
-
- row_items = [
- dbc.Col(
+
+ tab_items = [
+ dbc.Tab(
children=dcc.Graph(
id={"type": "graph", "index": "tput"},
- figure=figs[0]
+ figure=graphs[0]
),
- class_name="g-0 p-1",
- width=6
+ label="Throughput",
+ tab_id="tab-tput"
)
]
- if figs[1]:
- row_items.append(
- dbc.Col(
+ if graphs[1]:
+ tab_items.append(
+ dbc.Tab(
+ children=dcc.Graph(
+ id={"type": "graph", "index": "bandwidth"},
+ figure=graphs[1]
+ ),
+ label="Bandwidth",
+ tab_id="tab-bandwidth"
+ )
+ )
+
+ if graphs[2]:
+ tab_items.append(
+ dbc.Tab(
children=dcc.Graph(
id={"type": "graph", "index": "lat"},
- figure=figs[1]
+ figure=graphs[2]
),
- class_name="g-0 p-1",
- width=6
+ label="Latency",
+ tab_id="tab-lat"
)
)
return [
dbc.Row(
- children=row_items,
- class_name="g-0 p-0",
+ dbc.Tabs(
+ children=tab_items,
+ id="tabs",
+ active_tab="tab-tput",
+ ),
+ class_name="g-0 p-0"
),
dbc.Row(
[
@@ -1364,8 +1381,16 @@ class Layout:
trigger = Trigger(callback_context.triggered)
+ if trigger.idx == "tput":
+ idx = 0
+ elif trigger.idx == "bandwidth":
+ idx = 1
+ elif trigger.idx == "lat":
+ idx = len(graph_data) - 1
+ else:
+ return list(), list(), False
+
try:
- idx = 0 if trigger.idx == "tput" else 1
graph_data = graph_data[idx]["points"]
except (IndexError, KeyError, ValueError, TypeError):
raise PreventUpdate
@@ -1391,6 +1416,8 @@ class Layout:
elif len(data) == 1:
if param == "lat":
stats = ("average latency at 50% PDR", )
+ elif param == "bandwidth":
+ stats = ("bandwidth", )
else:
stats = ("throughput", )
else:
@@ -1419,6 +1446,8 @@ class Layout:
graph = list()
if trigger.idx == "tput":
title = "Throughput"
+ elif trigger.idx == "bandwidth":
+ title = "Bandwidth"
elif trigger.idx == "lat":
title = "Latency"
if len(graph_data) == 1: