@@ -246,7 +246,7 @@ const reducer = handleActions<OpenSearchState>(
246
246
initialState
247
247
) ;
248
248
249
- export const getIndices = ( searchKey = '' , dataSourceId = '' ) => {
249
+ export const getIndices = ( searchKey = '' , dataSourceId : string ) => {
250
250
const baseUrl = `..${ AD_NODE_API . _INDICES } ` ;
251
251
const url = dataSourceId ? `${ baseUrl } /${ dataSourceId } ` : baseUrl ;
252
252
@@ -259,7 +259,7 @@ export const getIndices = (searchKey = '', dataSourceId = '') => {
259
259
260
260
export const getAliases = (
261
261
searchKey : string = '' ,
262
- dataSourceId = ''
262
+ dataSourceId : string
263
263
) : APIAction => {
264
264
const baseUrl = `..${ AD_NODE_API . _ALIASES } ` ;
265
265
const url = dataSourceId ? `${ baseUrl } /${ dataSourceId } ` : baseUrl ;
@@ -287,7 +287,7 @@ export const searchOpenSearch = (requestData: any): APIAction => ({
287
287
} ) ,
288
288
} ) ;
289
289
290
- export const createIndex = ( indexConfig : any , dataSourceId = '' ) : APIAction => {
290
+ export const createIndex = ( indexConfig : any , dataSourceId : string ) : APIAction => {
291
291
const url = dataSourceId
292
292
? `${ AD_NODE_API . CREATE_INDEX } /${ dataSourceId } `
293
293
: AD_NODE_API . CREATE_INDEX ;
@@ -300,7 +300,7 @@ export const createIndex = (indexConfig: any, dataSourceId = ''): APIAction => {
300
300
} ;
301
301
} ;
302
302
303
- export const bulk = ( body : any , dataSourceId = '' ) : APIAction => {
303
+ export const bulk = ( body : any , dataSourceId : string ) : APIAction => {
304
304
const url = dataSourceId
305
305
? `${ AD_NODE_API . BULK } /${ dataSourceId } `
306
306
: AD_NODE_API . BULK ;
@@ -318,7 +318,7 @@ export const deleteIndex = (index: string): APIAction => ({
318
318
} ) ;
319
319
320
320
export const getPrioritizedIndices =
321
- ( searchKey : string , dataSourceId = '' ) : ThunkAction =>
321
+ ( searchKey : string , dataSourceId : string ) : ThunkAction =>
322
322
async ( dispatch , getState ) => {
323
323
//Fetch Indices and Aliases with text provided
324
324
await dispatch ( getIndices ( searchKey , dataSourceId ) ) ;
0 commit comments