mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Loki: Allow setting of timeRange when using languageProvider functions * Loki: Use timerange where available for start * Loki: Use timerange where available for fetchLabels * Loki: Use timerange where available for fetchSeriesLabels * Loki: Use timerange where available for fetchLabelValues * Loki: Use timerange where available for getParserAndLabelKeys * Loki: Update and add tests for fetchLabels * Loki: Update and add tests for fetchSeriesLabels * Loki: Update and add tests for fetchSeries * Loki: Update and add tests for fetchLabelValues * Loki: Update and add tests for fetchLabelValues * Loki: Update and add tests for getParserAndLabelKeys * Update public/app/plugins/datasource/loki/LanguageProvider.test.ts Co-authored-by: Matias Chomicki <matyax@gmail.com> * Update public/app/plugins/datasource/loki/LanguageProvider.test.ts Co-authored-by: Matias Chomicki <matyax@gmail.com> * Not needing to use languageProvider.getDefaultTime in Monaco * Update comment * Update getDefaultTimeRange to be ptivate --------- Co-authored-by: Matias Chomicki <matyax@gmail.com>
20 lines
597 B
TypeScript
20 lines
597 B
TypeScript
import { HistoryItem, TimeRange } from '@grafana/data';
|
|
|
|
import { LokiDatasource } from '../../datasource';
|
|
import { LokiQuery } from '../../types';
|
|
|
|
// we need to store this in a separate file,
|
|
// because we have an async-wrapper around,
|
|
// the react-component, and it needs the same
|
|
// props as the sync-component.
|
|
export type Props = {
|
|
initialValue: string;
|
|
history: Array<HistoryItem<LokiQuery>>;
|
|
onRunQuery: (value: string) => void;
|
|
onBlur: (value: string) => void;
|
|
placeholder: string;
|
|
datasource: LokiDatasource;
|
|
onChange: (query: string) => void;
|
|
timeRange?: TimeRange;
|
|
};
|