Skip to content

Commit bfe768e

Browse files
committed
Make the detectorName follow the convention
Signed-off-by: gaobinlong <gbinlong@amazon.com>
1 parent 5a3e736 commit bfe768e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public/components/DiscoverAction/SuggestAnomalyDetector.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import { FeaturesFormikValues } from '../../pages/ConfigureModel/models/interfac
7272
import { DiscoverActionContext } from '../../../../../src/plugins/data_explorer/public/types';
7373
import { getMappings } from '../../redux/reducers/opensearch';
7474
import { mountReactNode } from '../../../../../src/core/public/utils';
75+
import { formikToDetectorName } from '../FeatureAnywhereContextMenu/CreateAnomalyDetector/helpers';
7576

7677
export interface GeneratedParameters {
7778
categoryField: string;
@@ -126,7 +127,7 @@ function GenerateAnomalyDetector({
126127
const [delayValue, setDelayValue] = useState(1);
127128
const [enabled, setEnabled] = useState<boolean>(false);
128129
const [detectorName, setDetectorName] = useState(
129-
indexPatternName.replace('*', '-') + '_anomaly_detector'
130+
formikToDetectorName(indexPatternName)
130131
);
131132

132133
// let LLM to generate parameters for creating anomaly detector

0 commit comments

Comments
 (0)