File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -384,9 +384,11 @@ export class QuickwitDataSource
384384 ) ;
385385 }
386386
387- getFields ( spec : FieldCapsSpec = { } ) : Observable < MetricFindValue [ ] > {
388- // TODO: use the time range.
389- return from ( this . getResource ( '_elastic/' + this . index + '/_field_caps' ) ) . pipe (
387+ getFields ( spec : FieldCapsSpec = { } , range = getDefaultTimeRange ( ) ) : Observable < MetricFindValue [ ] > {
388+ return from ( this . getResource ( '_elastic/' + this . index + '/_field_caps' , {
389+ start_timestamp : Math . floor ( range . from . valueOf ( ) / SECOND ) ,
390+ end_timestamp : Math . ceil ( range . to . valueOf ( ) / SECOND ) ,
391+ } ) ) . pipe (
390392 map ( ( field_capabilities_response : FieldCapabilitiesResponse ) => {
391393 const shouldAddField = ( field : any ) => {
392394 if ( spec . aggregatable !== undefined && field . aggregatable !== spec . aggregatable ) {
You can’t perform that action at this time.
0 commit comments