X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=csit.infra.dash%2Fapp%2Fcdash%2Ftrending%2Flayout.py;h=d08f9110360619af238f0f3fed5a5610d7bfbd38;hb=86ec9713ecde3d92ec4585d487ddfac5077428c8;hp=84a68f5050605672c1d4cbaf030a283158eedfee;hpb=c17ad9031ead7a9d658f9e83e78a494dfa0ed040;p=csit.git diff --git a/csit.infra.dash/app/cdash/trending/layout.py b/csit.infra.dash/app/cdash/trending/layout.py index 84a68f5050..d08f911036 100644 --- a/csit.infra.dash/app/cdash/trending/layout.py +++ b/csit.infra.dash/app/cdash/trending/layout.py @@ -265,7 +265,7 @@ class Layout: dbc.Offcanvas( class_name="w-50", id="offcanvas-metadata", - title="Throughput And Latency", + title="Detailed Information", placement="end", is_open=False, children=[ @@ -646,9 +646,21 @@ class Layout: tab_items.append( dbc.Tab( children=dcc.Graph( - id={"type": "graph", "index": "lat"}, + 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=graphs[2] + ), label="Latency", tab_id="tab-lat" ) @@ -1690,7 +1702,14 @@ class Layout: trigger = Trigger(callback_context.triggered) try: - idx = 0 if trigger.idx == "tput" else 1 + if trigger.idx == "tput": + idx = 0 + elif trigger.idx == "bandwidth": + idx = 1 + elif trigger.idx == "lat": + idx = 2 + else: + raise PreventUpdate graph_data = graph_data[idx]["points"][0] except (IndexError, KeyError, ValueError, TypeError): raise PreventUpdate @@ -1721,6 +1740,8 @@ class Layout: if trigger.idx == "tput": title = "Throughput" + elif trigger.idx == "bandwidth": + title = "Bandwidth" elif trigger.idx == "lat": title = "Latency" hdrh_data = graph_data.get("customdata", None)