From 45743d683c27d70dea62944f5e797e493cd31a91 Mon Sep 17 00:00:00 2001 From: Ashwin P Chandran Date: Mon, 26 Aug 2024 20:41:43 +0000 Subject: [PATCH] minor fixes Signed-off-by: Ashwin P Chandran --- .../query/query_string/dataset_service/lib/index_type.ts | 2 +- .../data/public/ui/dataset_selector/dataset_selector.tsx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts b/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts index fcc531c56f80..738e763c0508 100644 --- a/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts +++ b/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts @@ -84,7 +84,7 @@ export const indexTypeConfig: DatasetTypeConfig = { }, supportedLanguages: (dataset: Dataset): string[] => { - return ['SQL', 'PPL', 'DQL', 'Lucene']; + return ['SQL', 'PPL']; }, }; diff --git a/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx b/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx index 01441f736c79..ed0bd76fdaf1 100644 --- a/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx +++ b/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx @@ -41,10 +41,8 @@ export const DatasetSelector = ({ datasetService.getType(selectedDataset?.type || '')?.meta.icon.type || 'database'; const fetchDatasets = useCallback(async () => { - const typeConfig = datasetService.getType(selectedDataset?.type || ''); - if (!typeConfig || typeConfig.id !== DEFAULT_DATA.SET_TYPES.INDEX_PATTERN) { - return; - } + const typeConfig = datasetService.getType(DEFAULT_DATA.SET_TYPES.INDEX_PATTERN); + if (!typeConfig) return; const fetchedIndexPatternDataStructures = await typeConfig.fetch(savedObjects.client, []);