aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/news/layout.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2023-04-24 16:29:08 +0200
committerTibor Frank <tifrank@cisco.com>2023-04-24 16:44:51 +0200
commit272dec4e1f9bb0d04e0546e705aaecf314d7cd28 (patch)
tree55ec87423ca786ad59076abaf9884c4deca101a8 /csit.infra.dash/app/cdash/news/layout.py
parentf578663642305f144f76ddadf0370701147f18ff (diff)
C-Dash: Fix anomaly detection for the news
Signed-off-by: Tibor Frank <tifrank@cisco.com> Change-Id: I63e280e15e82583b65691be17a07208d0ab788ce
Diffstat (limited to 'csit.infra.dash/app/cdash/news/layout.py')
-rw-r--r--csit.infra.dash/app/cdash/news/layout.py12
1 files changed, 8 insertions, 4 deletions
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(