From 272dec4e1f9bb0d04e0546e705aaecf314d7cd28 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Mon, 24 Apr 2023 16:29:08 +0200 Subject: C-Dash: Fix anomaly detection for the news Signed-off-by: Tibor Frank Change-Id: I63e280e15e82583b65691be17a07208d0ab788ce --- csit.infra.dash/app/cdash/news/layout.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'csit.infra.dash/app/cdash/news/layout.py') diff --git a/csit.infra.dash/app/cdash/news/layout.py b/csit.infra.dash/app/cdash/news/layout.py index da36b1430c..d8ad92a1db 100644 --- a/csit.infra.dash/app/cdash/news/layout.py +++ b/csit.infra.dash/app/cdash/news/layout.py @@ -24,7 +24,8 @@ from dash import callback_context from dash import Input, Output, State from ..utils.constants import Constants as C -from ..utils.utils import classify_anomalies, gen_new_url +from ..utils.utils import gen_new_url +from ..utils.anomalies import classify_anomalies from ..utils.url_processing import url_decode from .tables import table_summary @@ -132,15 +133,17 @@ class Layout: tests = df_job["test_id"].unique() for test in tests: - tst_data = df_job.loc[df_job["test_id"] == test].sort_values( - by="start_time", ignore_index=True) - x_axis = tst_data["start_time"].tolist() + tst_data = df_job.loc[( + (df_job["test_id"] == test) & + (df_job["passed"] == True) + )].sort_values(by="start_time", ignore_index=True) if "-ndrpdr" in test: tst_data = tst_data.dropna( subset=["result_pdr_lower_rate_value", ] ) if tst_data.empty: continue + x_axis = tst_data["start_time"].tolist() try: anomalies, _, _ = classify_anomalies({ k: v for k, v in zip( @@ -185,6 +188,7 @@ class Layout: ) if tst_data.empty: continue + x_axis = tst_data["start_time"].tolist() try: anomalies, _, _ = classify_anomalies({ k: v for k, v in zip( -- cgit 1.2.3-korg