- if not sel:
- return no_update, no_update
-
- def _is_selected(label, sel):
- for itm in sel:
- phy = itm["phy"].split("-")
- if len(phy) == 4:
- topo, arch, nic, drv = phy
- else:
- continue
- if nic not in label:
- continue
- if drv != "dpdk" and drv not in label:
- continue
- if itm["test"] not in label:
- continue
- if itm["framesize"] not in label:
- continue
- if itm["core"] not in label:
- continue
- if itm["testtype"] not in label:
- continue
- return (
- f"{itm['phy']}-{itm['framesize']}-{itm['core']}-"
- f"{itm['test']}-{itm['testtype']}"
- )
- else:
- return None
-
- style={
- "vertical-align": "top",
- "display": "inline-block",
- "width": "80%",
- "padding": "5px"
- }
-
- fig = go.Figure()
- dates = self.data.iloc[[0], 1:].values.flatten().tolist()[::-1]
- x_data = [
- datetime(
- int(date[0:4]), int(date[4:6]), int(date[6:8]),
- int(date[9:11]), int(date[12:])
- ) for date in dates
- ]
- x_data_range = [
- date for date in x_data if date >= start and date <= end
+ metadata = no_update
+ graph = list()
+
+ trigger_id = callback_context.triggered[0]["prop_id"].split(".")[0]
+ if trigger_id == "graph-tput":
+ title = "Throughput"
+ txt = tput_data["points"][0]["text"].replace("<br>", "\n")
+ elif trigger_id == "graph-latency":
+ title = "Latency"
+ txt = lat_data["points"][0]["text"].replace("<br>", "\n")
+ hdrh_data = lat_data["points"][0].get("customdata", None)
+ if hdrh_data:
+ graph = [dcc.Graph(
+ id="hdrh-latency-graph",
+ figure=graph_hdrh_latency(hdrh_data, self.layout)
+ ), ]
+
+ metadata = [
+ dbc.Card(
+ children=[
+ dbc.CardHeader(children=[
+ dcc.Clipboard(
+ target_id="tput-lat-metadata",
+ title="Copy",
+ style={"display": "inline-block"}
+ ),
+ title
+ ]),
+ dbc.CardBody(
+ id="tput-lat-metadata",
+ children=[txt]
+ )
+ ]
+ )