1- import { first as _first , map as _map } from 'lodash' ;
21import { Observable , lastValueFrom , from , of } from 'rxjs' ;
32import { map , mergeMap } from 'rxjs/operators' ;
43
@@ -10,10 +9,8 @@ import {
109 DataQueryRequest ,
1110 DataQueryResponse ,
1211 DataSourceInstanceSettings ,
13- DataSourceWithLogsContextSupport ,
1412 DataSourceWithQueryImportSupport ,
1513 getDefaultTimeRange ,
16- LogRowModel ,
1714 MetricFindValue ,
1815 QueryFixAction ,
1916 ScopedVars ,
@@ -32,10 +29,8 @@ import { isMetricAggregationWithField } from 'components/QueryEditor/MetricAggre
3229import { bucketAggregationConfig } from 'components/QueryEditor/BucketAggregationsEditor/utils' ;
3330import { isBucketAggregationWithField } from 'components/QueryEditor/BucketAggregationsEditor/aggregations' ;
3431import ElasticsearchLanguageProvider from 'LanguageProvider' ;
35- import { ReactNode } from 'react' ;
3632import { fieldTypeMap } from 'utils' ;
3733import { addAddHocFilter } from 'modifyQuery' ;
38- import { LogContextProvider , LogRowContextOptions } from '@/LogContext/LogContextProvider' ;
3934import { getQueryResponseProcessor } from 'datasource/processResponse' ;
4035
4136import { SECOND } from 'utils/time' ;
@@ -53,7 +48,6 @@ type FieldCapsSpec = {
5348export class BaseQuickwitDataSource
5449 extends DataSourceWithBackend < ElasticsearchQuery , QuickwitOptions >
5550 implements
56- DataSourceWithLogsContextSupport ,
5751 DataSourceWithQueryImportSupport < ElasticsearchQuery >
5852{
5953 index : string ;
@@ -63,7 +57,6 @@ export class BaseQuickwitDataSource
6357 dataLinks : DataLinkConfig [ ] ;
6458 languageProvider : ElasticsearchLanguageProvider ;
6559
66- private logContextProvider : LogContextProvider ;
6760
6861 constructor (
6962 instanceSettings : DataSourceInstanceSettings < QuickwitOptions > ,
@@ -77,7 +70,6 @@ export class BaseQuickwitDataSource
7770 this . logLevelField = settingsData . logLevelField || '' ;
7871 this . dataLinks = settingsData . dataLinks || [ ] ;
7972 this . languageProvider = new ElasticsearchLanguageProvider ( this ) ;
80- this . logContextProvider = new LogContextProvider ( this ) ;
8173 }
8274
8375 query ( request : DataQueryRequest < ElasticsearchQuery > ) : Observable < DataQueryResponse > {
@@ -283,28 +275,6 @@ export class BaseQuickwitDataSource
283275 return text ;
284276 }
285277
286- // Log Context
287-
288- // NOTE : deprecated since grafana-data 10.3
289- showContextToggle ( row ?: LogRowModel | undefined ) : boolean {
290- return true ;
291- }
292-
293- getLogRowContext = async (
294- row : LogRowModel ,
295- options ?: LogRowContextOptions ,
296- origQuery ?: ElasticsearchQuery
297- ) : Promise < { data : DataFrame [ ] } > => {
298- return await this . logContextProvider . getLogRowContext ( row , options , origQuery ) ;
299- }
300-
301- getLogRowContextUi (
302- row : LogRowModel ,
303- runContextQuery ?: ( ( ) => void ) ,
304- origQuery ?: ElasticsearchQuery
305- ) : ReactNode {
306- return this . logContextProvider . getLogRowContextUi ( row , runContextQuery , origQuery ) ;
307- }
308278
309279 /**
310280 * Returns false if the query should be skipped
0 commit comments