@@ -170,15 +170,15 @@ export const DetectorList = (props: ListProps) => {
170
170
const [ indexQuery , setIndexQuery ] = useState ( '' ) ;
171
171
useEffect ( ( ) => {
172
172
const getInitialIndices = async ( ) => {
173
- await dispatch ( getIndices ( indexQuery ) ) ;
173
+ await dispatch ( getIndices ( indexQuery , state . selectedDataSourceId ) ) ;
174
174
} ;
175
175
getInitialIndices ( ) ;
176
176
} , [ ] ) ;
177
177
178
178
// Getting all initial monitors
179
179
useEffect ( ( ) => {
180
180
const getInitialMonitors = async ( ) => {
181
- dispatch ( searchMonitors ( ) ) ;
181
+ dispatch ( searchMonitors ( state . selectedDataSourceId ) ) ;
182
182
} ;
183
183
getInitialMonitors ( ) ;
184
184
} , [ ] ) ;
@@ -339,7 +339,7 @@ export const DetectorList = (props: ListProps) => {
339
339
if ( searchValue !== indexQuery ) {
340
340
const sanitizedQuery = sanitizeSearchText ( searchValue ) ;
341
341
setIndexQuery ( sanitizedQuery ) ;
342
- await dispatch ( getPrioritizedIndices ( sanitizedQuery ) ) ;
342
+ await dispatch ( getPrioritizedIndices ( sanitizedQuery , state . selectedDataSourceId ) ) ;
343
343
setState ( ( state ) => ( {
344
344
...state ,
345
345
page : 0 ,
@@ -479,7 +479,7 @@ export const DetectorList = (props: ListProps) => {
479
479
DETECTOR_ACTION . START
480
480
) . map ( ( detector ) => detector . id ) ;
481
481
const promises = validIds . map ( async ( id : string ) => {
482
- return dispatch ( startDetector ( id ) ) ;
482
+ return dispatch ( startDetector ( id , state . selectedDataSourceId ) ) ;
483
483
} ) ;
484
484
await Promise . all ( promises )
485
485
. then ( ( ) => {
@@ -506,7 +506,7 @@ export const DetectorList = (props: ListProps) => {
506
506
DETECTOR_ACTION . STOP
507
507
) . map ( ( detector ) => detector . id ) ;
508
508
const promises = validIds . map ( async ( id : string ) => {
509
- return dispatch ( stopDetector ( id ) ) ;
509
+ return dispatch ( stopDetector ( id , state . selectedDataSourceId ) ) ;
510
510
} ) ;
511
511
await Promise . all ( promises )
512
512
. then ( ( ) => {
@@ -538,7 +538,7 @@ export const DetectorList = (props: ListProps) => {
538
538
DETECTOR_ACTION . DELETE
539
539
) . map ( ( detector ) => detector . id ) ;
540
540
const promises = validIds . map ( async ( id : string ) => {
541
- return dispatch ( deleteDetector ( id ) ) ;
541
+ return dispatch ( deleteDetector ( id , state . selectedDataSourceId ) ) ;
542
542
} ) ;
543
543
await Promise . all ( promises )
544
544
. then ( ( ) => {
0 commit comments