@@ -2,7 +2,6 @@ import { cloneDeep, first as _first, map as _map, groupBy } from 'lodash';
2
2
import { Observable , lastValueFrom , from , isObservable , of } from 'rxjs' ;
3
3
import { catchError , mergeMap , map } from 'rxjs/operators' ;
4
4
import { intervalMap } from './IntervalMap' ;
5
- import { Interval } from './types' ;
6
5
7
6
import {
8
7
AbstractQuery ,
@@ -33,7 +32,7 @@ import {
33
32
SupplementaryQueryType ,
34
33
TimeRange ,
35
34
} from '@grafana/data' ;
36
- import { BucketAggregation , DataLinkConfig , ElasticsearchQuery , Field , FieldMapping , IndexMetadata , Logs , TermsQuery } from './types' ;
35
+ import { BucketAggregation , DataLinkConfig , ElasticsearchQuery , Field , FieldMapping , IndexMetadata , Logs , TermsQuery , Interval } from './types' ;
37
36
import { DataSourceWithBackend , getTemplateSrv , TemplateSrv } from '@grafana/runtime' ;
38
37
import { LogRowContextOptions , LogRowContextQueryDirection , QuickwitOptions } from 'quickwit' ;
39
38
import { ElasticQueryBuilder } from 'QueryBuilder' ;
@@ -437,6 +436,7 @@ export class QuickwitDataSource
437
436
438
437
private makeLogContextDataRequest = ( row : LogRowModel , options ?: LogRowContextOptions ) => {
439
438
const direction = options ?. direction || LogRowContextQueryDirection . Backward ;
439
+
440
440
const logQuery : Logs = {
441
441
type : 'logs' ,
442
442
id : '1' ,
@@ -445,7 +445,7 @@ export class QuickwitDataSource
445
445
// Sorting of results in the context query
446
446
sortDirection : direction === LogRowContextQueryDirection . Backward ? 'desc' : 'asc' ,
447
447
// Used to get the next log lines before/after the current log line using sort field of selected log line
448
- searchAfter : row . dataFrame . fields . find ( ( f ) => f . name === 'sort' ) ?. values [ row . rowIndex ] ?? [ row . timeEpochMs ] ,
448
+ searchAfter : row . dataFrame . fields . find ( ( f ) => f . name === 'sort' ) ?. values . get ( row . rowIndex ) ?? [ row . timeEpochMs ] ,
449
449
} ,
450
450
} ;
451
451
@@ -501,7 +501,7 @@ export class QuickwitDataSource
501
501
}
502
502
503
503
getLogRowContextUi ?( row : LogRowModel , runContextQuery ?: ( ( ) => void ) | undefined ) : ReactNode {
504
- throw new Error ( 'Method not implemented.' ) ;
504
+ return true ;
505
505
}
506
506
507
507
/**
0 commit comments