mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Datasource: updates PromExploreQueryEditor - rewrite to functional component * Datasource: updates PromQueryField - moves an extra field from children to the separate prop * Datasource: adds PromExploreExtraField * Datasource: updates PromExploreQueryEditor - fixes typo * Datasource: updates prometheus explore editor snapshots * Datasource: updates PromExploreExtraField export * Datasource: removes unnecessary div from PromExploreQueryEditor * Datasource: adds basic PromExploreExtraField snapshot test * Datasource: adds basic PromExploreQueryEditor test * Datasource: updates PromExploreQueryEditor snapshot to fix timezone issues * Datasource: updates PromExploreQueryEditor - onChangeQueryStep cleanup * Datasource: updates PromExploreQueryEditor test to check ExtraFieldElement render * Datasource: simplified PromExploreQueryEditor onStepChange method * Datasource: updates Prometheus module import * Datasource: updates PromExploreQueryEditor test * Datasource: updates PromExploreQueryEditor tests * Datasource: fixes PromExploreQueryEditor error on empty interval init * Datasource: adds a tooltip to PromExploreExtraField mounted in PromExploreQueryEditor * Datasource: updates PromExploreQueryEditor snapshots
21 lines
844 B
TypeScript
21 lines
844 B
TypeScript
import { DataSourcePlugin } from '@grafana/data';
|
|
import { ANNOTATION_QUERY_STEP_DEFAULT, PrometheusDatasource } from './datasource';
|
|
|
|
import { PromQueryEditor } from './components/PromQueryEditor';
|
|
import PromCheatSheet from './components/PromCheatSheet';
|
|
import PromExploreQueryEditor from './components/PromExploreQueryEditor';
|
|
|
|
import { ConfigEditor } from './configuration/ConfigEditor';
|
|
|
|
class PrometheusAnnotationsQueryCtrl {
|
|
static templateUrl = 'partials/annotations.editor.html';
|
|
stepDefaultValuePlaceholder = ANNOTATION_QUERY_STEP_DEFAULT;
|
|
}
|
|
|
|
export const plugin = new DataSourcePlugin(PrometheusDatasource)
|
|
.setQueryEditor(PromQueryEditor)
|
|
.setConfigEditor(ConfigEditor)
|
|
.setExploreMetricsQueryField(PromExploreQueryEditor)
|
|
.setAnnotationQueryCtrl(PrometheusAnnotationsQueryCtrl)
|
|
.setExploreStartPage(PromCheatSheet);
|