1
- import { first as _first , map as _map } from 'lodash' ;
2
1
import { Observable , lastValueFrom , from , of } from 'rxjs' ;
3
2
import { map , mergeMap } from 'rxjs/operators' ;
4
3
@@ -10,10 +9,8 @@ import {
10
9
DataQueryRequest ,
11
10
DataQueryResponse ,
12
11
DataSourceInstanceSettings ,
13
- DataSourceWithLogsContextSupport ,
14
12
DataSourceWithQueryImportSupport ,
15
13
getDefaultTimeRange ,
16
- LogRowModel ,
17
14
MetricFindValue ,
18
15
QueryFixAction ,
19
16
ScopedVars ,
@@ -32,10 +29,8 @@ import { isMetricAggregationWithField } from 'components/QueryEditor/MetricAggre
32
29
import { bucketAggregationConfig } from 'components/QueryEditor/BucketAggregationsEditor/utils' ;
33
30
import { isBucketAggregationWithField } from 'components/QueryEditor/BucketAggregationsEditor/aggregations' ;
34
31
import ElasticsearchLanguageProvider from 'LanguageProvider' ;
35
- import { ReactNode } from 'react' ;
36
32
import { fieldTypeMap } from 'utils' ;
37
33
import { addAddHocFilter } from 'modifyQuery' ;
38
- import { LogContextProvider , LogRowContextOptions } from '@/LogContext/LogContextProvider' ;
39
34
import { getQueryResponseProcessor } from 'datasource/processResponse' ;
40
35
41
36
import { SECOND } from 'utils/time' ;
@@ -53,7 +48,6 @@ type FieldCapsSpec = {
53
48
export class BaseQuickwitDataSource
54
49
extends DataSourceWithBackend < ElasticsearchQuery , QuickwitOptions >
55
50
implements
56
- DataSourceWithLogsContextSupport ,
57
51
DataSourceWithQueryImportSupport < ElasticsearchQuery >
58
52
{
59
53
index : string ;
@@ -63,7 +57,6 @@ export class BaseQuickwitDataSource
63
57
dataLinks : DataLinkConfig [ ] ;
64
58
languageProvider : ElasticsearchLanguageProvider ;
65
59
66
- private logContextProvider : LogContextProvider ;
67
60
68
61
constructor (
69
62
instanceSettings : DataSourceInstanceSettings < QuickwitOptions > ,
@@ -77,7 +70,6 @@ export class BaseQuickwitDataSource
77
70
this . logLevelField = settingsData . logLevelField || '' ;
78
71
this . dataLinks = settingsData . dataLinks || [ ] ;
79
72
this . languageProvider = new ElasticsearchLanguageProvider ( this ) ;
80
- this . logContextProvider = new LogContextProvider ( this ) ;
81
73
}
82
74
83
75
query ( request : DataQueryRequest < ElasticsearchQuery > ) : Observable < DataQueryResponse > {
@@ -283,28 +275,6 @@ export class BaseQuickwitDataSource
283
275
return text ;
284
276
}
285
277
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
- }
308
278
309
279
/**
310
280
* Returns false if the query should be skipped
0 commit comments