aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/dash/app/pal
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-04-20 09:40:34 +0200
committerTibor Frank <tifrank@cisco.com>2022-04-20 09:40:34 +0200
commitf63e6b83d830734fdb94b8f0384a808f189711f1 (patch)
treea28aed5eb379778709d49fad2125b206b3c1a0c9 /resources/tools/dash/app/pal
parenteefc901a89aa755ba41a2ec615da7610c57fe971 (diff)
feat(uti): hrdh latency graph
Change-Id: Ib08b31b6dda79c66f4d204145a1b2ed78e9636b4 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/dash/app/pal')
-rw-r--r--resources/tools/dash/app/pal/trending/graphs.py6
-rw-r--r--resources/tools/dash/app/pal/trending/layout.py19
-rw-r--r--resources/tools/dash/app/pal/trending/layout.yaml10
3 files changed, 19 insertions, 16 deletions
diff --git a/resources/tools/dash/app/pal/trending/graphs.py b/resources/tools/dash/app/pal/trending/graphs.py
index dc4e7afca8..4273d9d2f8 100644
--- a/resources/tools/dash/app/pal/trending/graphs.py
+++ b/resources/tools/dash/app/pal/trending/graphs.py
@@ -386,11 +386,6 @@ def graph_hdrh_latency(data: dict, layout: dict) -> go.Figure:
fig = None
- try:
- name = data.pop("name")
- except (KeyError, AttributeError):
- return None
-
traces = list()
for idx, (lat_name, lat_hdrh) in enumerate(data.items()):
try:
@@ -450,7 +445,6 @@ def graph_hdrh_latency(data: dict, layout: dict) -> go.Figure:
fig.add_traces(traces)
layout_hdrh = layout.get("plot-hdrh-latency", None)
if lat_hdrh:
- layout_hdrh["title"]["text"] = f"<b>{name}</b>"
fig.update_layout(layout_hdrh)
return fig
diff --git a/resources/tools/dash/app/pal/trending/layout.py b/resources/tools/dash/app/pal/trending/layout.py
index c12d64a213..dd097b449f 100644
--- a/resources/tools/dash/app/pal/trending/layout.py
+++ b/resources/tools/dash/app/pal/trending/layout.py
@@ -910,11 +910,20 @@ class Layout:
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)
- ), ]
-
+ graph = [dbc.Card(
+ class_name="g-0",
+ children=[
+ dbc.CardHeader(hdrh_data.pop("name")),
+ dbc.CardBody(children=[
+ dcc.Graph(
+ id="hdrh-latency-graph",
+ figure=graph_hdrh_latency(
+ hdrh_data, self.layout
+ )
+ )
+ ])
+ ])
+ ]
metadata = [
dbc.Card(
class_name="g-0",
diff --git a/resources/tools/dash/app/pal/trending/layout.yaml b/resources/tools/dash/app/pal/trending/layout.yaml
index 9645b744c0..0c0b62d591 100644
--- a/resources/tools/dash/app/pal/trending/layout.yaml
+++ b/resources/tools/dash/app/pal/trending/layout.yaml
@@ -155,10 +155,10 @@ plot-trending-lat:
namelength: -1
plot-hdrh-latency:
- title:
- text: "Latency by Percentile Distribution"
- xanchor: "center"
- x: 0.5
+ # title:
+ # text: "Latency by Percentile Distribution"
+ # xanchor: "center"
+ # x: 0.5
# font:
# size: 10
showlegend: True
@@ -192,7 +192,7 @@ plot-hdrh-latency:
# tickfont:
# size: 14
yaxis:
- title: "One-Way Latency per Direction [uSec]"
+ title: "One-Way Latency per Direction [us]"
# titlefont:
# size: 14
gridcolor: "rgb(230, 230, 230)"