From 9920dfa2f22e59f3199dc5707a56403df6da7c2e Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 3 Jul 2023 09:31:58 -0700 Subject: [PATCH] Change to anomaly start time; add test ids (#522) Signed-off-by: Tyler Ohlsen --- .../containers/AssociatedDetectors.tsx | 1 + .../CreateAnomalyDetector/AddAnomalyDetector.tsx | 8 ++++---- .../EnhancedAccordion/EnhancedAccordion.tsx | 1 + public/expressions/helpers.ts | 2 +- public/pages/DetectorConfig/containers/Features.tsx | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx index 8ab93c76..ac6ea8a8 100644 --- a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx +++ b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx @@ -314,6 +314,7 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) {
{ diff --git a/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx b/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx index da658662..6e22edab 100644 --- a/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx +++ b/public/components/FeatureAnywhereContextMenu/CreateAnomalyDetector/AddAnomalyDetector.tsx @@ -580,7 +580,7 @@ function AddAnomalyDetector({ onAccordionToggle('detectorDetails')} @@ -685,7 +685,7 @@ function AddAnomalyDetector({ @@ -838,7 +838,7 @@ function AddAnomalyDetector({ onAccordionToggle('modelFeatures')} @@ -910,7 +910,7 @@ function AddAnomalyDetector({ {mode === FLYOUT_MODES.existing ? ( handleAssociate(selectedDetector)} > diff --git a/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/EnhancedAccordion.tsx b/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/EnhancedAccordion.tsx index 17075e27..b129bc20 100644 --- a/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/EnhancedAccordion.tsx +++ b/public/components/FeatureAnywhereContextMenu/EnhancedAccordion/EnhancedAccordion.tsx @@ -51,6 +51,7 @@ const EnhancedAccordion = ({ buttonContent={
{ const events = anomalies.map((anomaly: AnomalyData) => { return { - timestamp: anomaly.startTime + (anomaly.endTime - anomaly.startTime) / 2, + timestamp: anomaly.startTime, metadata: {}, }; }); diff --git a/public/pages/DetectorConfig/containers/Features.tsx b/public/pages/DetectorConfig/containers/Features.tsx index d5b8e455..9cdb609d 100644 --- a/public/pages/DetectorConfig/containers/Features.tsx +++ b/public/pages/DetectorConfig/containers/Features.tsx @@ -234,6 +234,7 @@ export const Features = (props: FeaturesProps) => { titleSize="s" >