diff --git a/packages/grafana-prometheus/src/resource_clients.test.ts b/packages/grafana-prometheus/src/resource_clients.test.ts index 37cc07fd28e..9be8ce0a83b 100644 --- a/packages/grafana-prometheus/src/resource_clients.test.ts +++ b/packages/grafana-prometheus/src/resource_clients.test.ts @@ -4,8 +4,6 @@ import { PrometheusDatasource } from './datasource'; import { LabelsApiClient, processSeries, SeriesApiClient } from './resource_clients'; import { PrometheusCacheLevel } from './types'; -type MockDatasource = Pick; - const mockTimeRange: TimeRange = { from: dateTime(1681300292392), to: dateTime(1681300293392), diff --git a/packages/grafana-prometheus/src/resource_clients.ts b/packages/grafana-prometheus/src/resource_clients.ts index 1bf09e0cbb2..efa75a73e74 100644 --- a/packages/grafana-prometheus/src/resource_clients.ts +++ b/packages/grafana-prometheus/src/resource_clients.ts @@ -24,7 +24,11 @@ export interface ResourceApiClient { queryLabelValues: (timeRange: TimeRange, labelKey: string, match?: string, limit?: string) => Promise; } -type RequestFn = (url: string, params?: Record, options?: Partial) => Promise; +type RequestFn = ( + url: string, + params?: Record, + options?: Partial +) => Promise; const MATCH_ALL_LABELS = '{__name__!=""}'; const METRIC_LABEL = '__name__'; @@ -35,12 +39,20 @@ abstract class BaseResourceClient { protected readonly datasource: PrometheusDatasource ) {} - protected async requestLabels(url: string, params?: Record, options?: Partial): Promise { + protected async requestLabels( + url: string, + params?: Record, + options?: Partial + ): Promise { const response = await this.request(url, params, options); return Array.isArray(response) ? response : []; } - protected async requestSeries(url: string, params?: Record, options?: Partial): Promise { + protected async requestSeries( + url: string, + params?: Record, + options?: Partial + ): Promise { const response = await this.request(url, params, options); return Array.isArray(response) ? response : []; }