From 4c4d77e8f5ba0c2df76678f5f7bdbcc3afefc0da Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Thu, 14 Sep 2023 06:51:56 +0000 Subject: C-Dash: Add test name to hover info and offcanvas - split it to dut, infra and test name Change-Id: I3b87da70b67e30247b54ff56a7ffdd6a460dce78 Signed-off-by: Tibor Frank --- csit.infra.dash/app/cdash/trending/graphs.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/csit.infra.dash/app/cdash/trending/graphs.py b/csit.infra.dash/app/cdash/trending/graphs.py index fe85c13adb..ab8b627a7a 100644 --- a/csit.infra.dash/app/cdash/trending/graphs.py +++ b/csit.infra.dash/app/cdash/trending/graphs.py @@ -134,8 +134,12 @@ def graph_trending( hover = list() customdata = list() customdata_samples = list() + name_lst = name.split("-") for idx, (_, row) in enumerate(df.iterrows()): hover_itm = ( + f"dut: {name_lst[0]}
" + f"infra: {'-'.join(name_lst[1:5])}
" + f"test: {'-'.join(name_lst[5:])}
" f"date: {row['start_time'].strftime('%Y-%m-%d %H:%M:%S')}
" f" [{row[C.UNIT[ttype]]}]: {y_data[idx]:,.0f}
" f"" @@ -176,6 +180,9 @@ def graph_trending( hover_trend = list() for avg, stdev, (_, row) in zip(trend_avg, trend_stdev, df.iterrows()): hover_itm = ( + f"dut: {name_lst[0]}
" + f"infra: {'-'.join(name_lst[1:5])}
" + f"test: {'-'.join(name_lst[5:])}
" f"date: {row['start_time'].strftime('%Y-%m-%d %H:%M:%S')}
" f"trend [{row[C.UNIT[ttype]]}]: {avg:,.0f}
" f"stdev [{row[C.UNIT[ttype]]}]: {stdev:,.0f}
" @@ -199,7 +206,7 @@ def graph_trending( "symbol": "circle", }, text=hover, - hoverinfo="text+name", + hoverinfo="text", showlegend=True, legendgroup=name, customdata=customdata_samples @@ -215,7 +222,7 @@ def graph_trending( "color": color, }, text=hover_trend, - hoverinfo="text+name", + hoverinfo="text", showlegend=False, legendgroup=name, customdata=customdata @@ -233,6 +240,9 @@ def graph_trending( anomaly_y.append(trend_avg[idx]) anomaly_color.append(C.ANOMALY_COLOR[anomaly]) hover_itm = ( + f"dut: {name_lst[0]}
" + f"infra: {'-'.join(name_lst[1:5])}
" + f"test: {'-'.join(name_lst[5:])}
" f"date: {x_axis[idx].strftime('%Y-%m-%d %H:%M:%S')}
" f"trend [pps]: {trend_avg[idx]:,.0f}
" f"classification: {anomaly}" @@ -247,7 +257,7 @@ def graph_trending( y=anomaly_y, mode="markers", text=hover, - hoverinfo="text+name", + hoverinfo="text", showlegend=False, legendgroup=name, name=name, -- cgit 1.2.3-korg