Skip to content

Commit

Permalink
Change to anomaly start time; add test ids (opensearch-project#522)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
  • Loading branch information
ohltyler authored and amitgalitz committed Jul 7, 2023
1 parent 344aa3d commit 9920dfa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) {
<EuiFlexItem grow={false}>
<div>
<EuiButton
data-test-subj="associateDetectorButton"
fill
iconType="link"
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ function AddAnomalyDetector({
<EuiSpacer size="m" />

<EnhancedAccordion
id="detectorDetails"
id="detectorDetailsAccordion"
title={detectorNameFromVis}
isOpen={accordionsOpen.detectorDetails}
onToggle={() => onAccordionToggle('detectorDetails')}
Expand Down Expand Up @@ -685,7 +685,7 @@ function AddAnomalyDetector({
<EuiSpacer size="m" />

<EnhancedAccordion
id="advancedConfiguration"
id="advancedConfigurationAccordion"
title="Advanced configuration"
isOpen={accordionsOpen.advancedConfiguration}
onToggle={() =>
Expand Down Expand Up @@ -838,7 +838,7 @@ function AddAnomalyDetector({
<EuiSpacer size="m" />

<EnhancedAccordion
id="modelFeatures"
id="modelFeaturesAccordion"
title="Features"
isOpen={accordionsOpen.modelFeatures}
onToggle={() => onAccordionToggle('modelFeatures')}
Expand Down Expand Up @@ -910,7 +910,7 @@ function AddAnomalyDetector({
{mode === FLYOUT_MODES.existing ? (
<EuiButton
fill={true}
data-test-subj="adAnywhereCreateDetectorButton"
data-test-subj="adAnywhereAssociateDetectorButton"
isLoading={formikProps.isSubmitting}
onClick={() => handleAssociate(selectedDetector)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const EnhancedAccordion = ({
buttonContent={
<div className="enhanced-accordion__title">
<EuiTitle
data-test-subj="accordionTitleButton"
size="s"
onClick={onToggle}
role="button"
Expand Down
2 changes: 1 addition & 1 deletion public/expressions/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const convertAnomaliesToPointInTimeEventsVisLayer = (
): PointInTimeEventsVisLayer => {
const events = anomalies.map((anomaly: AnomalyData) => {
return {
timestamp: anomaly.startTime + (anomaly.endTime - anomaly.startTime) / 2,
timestamp: anomaly.startTime,
metadata: {},
};
});
Expand Down
1 change: 1 addition & 0 deletions public/pages/DetectorConfig/containers/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export const Features = (props: FeaturesProps) => {
titleSize="s"
>
<EuiBasicTable
data-test-subj="featureTable"
items={sortedItems}
columns={columns}
cellProps={getCellProps}
Expand Down

0 comments on commit 9920dfa

Please sign in to comment.