File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import React from 'react';
7
7
import { i18n } from '@osd/i18n' ;
8
8
import { EuiIconType } from '@elastic/eui' ;
9
9
import { toMountPoint } from '../../../../../src/plugins/opensearch_dashboards_react/public' ;
10
+ import { DEFAULT_DATA } from '../../../../../src/plugins/data/common' ;
10
11
import {
11
12
Action ,
12
13
createAction ,
@@ -121,7 +122,11 @@ export const getSuggestAnomalyDetectorAction = () => {
121
122
getIconType : ( ) => ANOMALY_DETECTION_ICON ,
122
123
// suggestAD is only compatible with data sources that have certain agents configured
123
124
isCompatible : async ( context ) => {
124
- if ( context . datasetId ) {
125
+ if (
126
+ context . datasetId &&
127
+ ( context . datasetType === DEFAULT_DATA . SET_TYPES . INDEX_PATTERN ||
128
+ context . datasetType === DEFAULT_DATA . SET_TYPES . INDEX )
129
+ ) {
125
130
const assistantClient = getAssistantClient ( ) ;
126
131
const res = await assistantClient . agentConfigExists (
127
132
SUGGEST_ANOMALY_DETECTOR_CONFIG_ID ,
You can’t perform that action at this time.
0 commit comments